#include <default_health_check_service.h>
Classes | |
class | HealthCheckServiceImpl |
class | ServiceData |
Public Types | |
enum | ServingStatus { NOT_FOUND, SERVING, NOT_SERVING } |
Public Member Functions | |
DefaultHealthCheckService () | |
HealthCheckServiceImpl * | GetHealthCheckService (std::unique_ptr< ServerCompletionQueue > cq) |
ServingStatus | GetServingStatus (const std::string &service_name) const |
void | SetServingStatus (bool serving) override |
Apply to all registered service names. More... | |
void | SetServingStatus (const std::string &service_name, bool serving) override |
Set or change the serving status of the given service_name. More... | |
void | Shutdown () override |
![]() | |
virtual | ~HealthCheckServiceInterface () |
Private Member Functions | |
void | RegisterCallHandler (const std::string &service_name, std::shared_ptr< HealthCheckServiceImpl::CallHandler > handler) |
void | UnregisterCallHandler (const std::string &service_name, const std::shared_ptr< HealthCheckServiceImpl::CallHandler > &handler) |
Private Attributes | |
std::unique_ptr< HealthCheckServiceImpl > | impl_ |
grpc_core::Mutex | mu_ |
std::map< std::string, ServiceData > | services_map_ |
bool | shutdown_ = false |
Definition at line 48 of file default_health_check_service.h.
Enumerator | |
---|---|
NOT_FOUND | |
SERVING | |
NOT_SERVING |
Definition at line 50 of file default_health_check_service.h.
grpc::DefaultHealthCheckService::DefaultHealthCheckService | ( | ) |
Definition at line 47 of file default_health_check_service.cc.
DefaultHealthCheckService::HealthCheckServiceImpl * grpc::DefaultHealthCheckService::GetHealthCheckService | ( | std::unique_ptr< ServerCompletionQueue > | cq | ) |
Definition at line 121 of file default_health_check_service.cc.
DefaultHealthCheckService::ServingStatus grpc::DefaultHealthCheckService::GetServingStatus | ( | const std::string & | service_name | ) | const |
Definition at line 86 of file default_health_check_service.cc.
|
private |
Definition at line 97 of file default_health_check_service.cc.
|
overridevirtual |
Apply to all registered service names.
Implements grpc::HealthCheckServiceInterface.
Definition at line 61 of file default_health_check_service.cc.
|
overridevirtual |
Set or change the serving status of the given service_name.
Implements grpc::HealthCheckServiceInterface.
Definition at line 51 of file default_health_check_service.cc.
|
overridevirtual |
Set all registered service names to not serving and prevent future state changes.
Reimplemented from grpc::HealthCheckServiceInterface.
Definition at line 73 of file default_health_check_service.cc.
|
private |
Definition at line 107 of file default_health_check_service.cc.
|
private |
Definition at line 286 of file default_health_check_service.h.
|
mutableprivate |
Definition at line 283 of file default_health_check_service.h.
|
private |
Definition at line 285 of file default_health_check_service.h.
Definition at line 284 of file default_health_check_service.h.