Classes | Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
grpc::DefaultHealthCheckService Class Referencefinal

#include <default_health_check_service.h>

Inheritance diagram for grpc::DefaultHealthCheckService:
Inheritance graph
[legend]

Classes

class  HealthCheckServiceImpl
 
class  ServiceData
 

Public Types

enum  ServingStatus { NOT_FOUND, SERVING, NOT_SERVING }
 

Public Member Functions

 DefaultHealthCheckService ()
 
HealthCheckServiceImplGetHealthCheckService (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
 
- Public Member Functions inherited from grpc::HealthCheckServiceInterface
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< HealthCheckServiceImplimpl_
 
grpc_core::Mutex mu_
 
std::map< std::string, ServiceDataservices_map_
 
bool shutdown_ = false
 

Detailed Description

Definition at line 48 of file default_health_check_service.h.

Member Enumeration Documentation

◆ ServingStatus

Enumerator
NOT_FOUND 
SERVING 
NOT_SERVING 

Definition at line 50 of file default_health_check_service.h.

Constructor & Destructor Documentation

◆ DefaultHealthCheckService()

grpc::DefaultHealthCheckService::DefaultHealthCheckService ( )

Definition at line 47 of file default_health_check_service.cc.

Member Function Documentation

◆ GetHealthCheckService()

DefaultHealthCheckService::HealthCheckServiceImpl * grpc::DefaultHealthCheckService::GetHealthCheckService ( std::unique_ptr< ServerCompletionQueue cq)

Definition at line 121 of file default_health_check_service.cc.

◆ GetServingStatus()

DefaultHealthCheckService::ServingStatus grpc::DefaultHealthCheckService::GetServingStatus ( const std::string &  service_name) const

Definition at line 86 of file default_health_check_service.cc.

◆ RegisterCallHandler()

void grpc::DefaultHealthCheckService::RegisterCallHandler ( const std::string &  service_name,
std::shared_ptr< HealthCheckServiceImpl::CallHandler handler 
)
private

Definition at line 97 of file default_health_check_service.cc.

◆ SetServingStatus() [1/2]

void grpc::DefaultHealthCheckService::SetServingStatus ( bool  serving)
overridevirtual

Apply to all registered service names.

Implements grpc::HealthCheckServiceInterface.

Definition at line 61 of file default_health_check_service.cc.

◆ SetServingStatus() [2/2]

void grpc::DefaultHealthCheckService::SetServingStatus ( const std::string &  service_name,
bool  serving 
)
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.

◆ Shutdown()

void grpc::DefaultHealthCheckService::Shutdown ( )
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.

◆ UnregisterCallHandler()

void grpc::DefaultHealthCheckService::UnregisterCallHandler ( const std::string &  service_name,
const std::shared_ptr< HealthCheckServiceImpl::CallHandler > &  handler 
)
private

Definition at line 107 of file default_health_check_service.cc.

Member Data Documentation

◆ impl_

std::unique_ptr<HealthCheckServiceImpl> grpc::DefaultHealthCheckService::impl_
private

Definition at line 286 of file default_health_check_service.h.

◆ mu_

grpc_core::Mutex grpc::DefaultHealthCheckService::mu_
mutableprivate

Definition at line 283 of file default_health_check_service.h.

◆ services_map_

std::map<std::string, ServiceData> grpc::DefaultHealthCheckService::services_map_
private

Definition at line 285 of file default_health_check_service.h.

◆ shutdown_

bool grpc::DefaultHealthCheckService::shutdown_ = false
private

Definition at line 284 of file default_health_check_service.h.


The documentation for this class was generated from the following files:


grpc
Author(s):
autogenerated on Fri May 16 2025 03:03:30