Go to the documentation of this file.
19 #ifndef GRPC_INTERNAL_CPP_SERVER_DEFAULT_HEALTH_CHECK_SERVICE_H
20 #define GRPC_INTERNAL_CPP_SERVER_DEFAULT_HEALTH_CHECK_SERVICE_H
59 virtual void SendHealth(std::shared_ptr<CallHandler>
self,
64 std::unique_ptr<ServerCompletionQueue>
cq);
171 void SendHealth(std::shared_ptr<CallHandler>
self,
233 std::unique_ptr<ServerCompletionQueue>
cq_;
252 std::unique_ptr<ServerCompletionQueue>
cq);
262 std::shared_ptr<HealthCheckServiceImpl::CallHandler>
handler);
264 const std::shared_ptr<HealthCheckServiceImpl::CallHandler>&
handler);
271 std::set<std::shared_ptr<HealthCheckServiceImpl::CallHandler>>
277 std::shared_ptr<HealthCheckServiceImpl::CallHandler>
handler);
281 const std::shared_ptr<HealthCheckServiceImpl::CallHandler>&
handler);
286 std::unique_ptr<HealthCheckServiceImpl>
impl_;
291 #endif // GRPC_INTERNAL_CPP_SERVER_DEFAULT_HEALTH_CHECK_SERVICE_H
CallableTag(HandlerFunction func, std::shared_ptr< CallHandler > handler)
void SendHealthLocked(std::shared_ptr< CallHandler > self, ServingStatus status)
DefaultHealthCheckService * database_
CallableTag on_finish_done_
std::unique_ptr< HealthCheckServiceImpl > impl_
void RequestAsyncUnary(int index, grpc::ServerContext *context, Message *request, internal::ServerAsyncStreamingInterface *stream, grpc::CompletionQueue *call_cq, grpc::ServerCompletionQueue *notification_cq, void *tag)
ServerCompletionQueue * cq_
ServingStatus GetServingStatus() const
void RegisterCallHandler(const std::string &service_name, std::shared_ptr< HealthCheckServiceImpl::CallHandler > handler)
DefaultHealthCheckService * database_
std::shared_ptr< CallHandler > ReleaseHandler()
void OnCallReceived(std::shared_ptr< CallHandler > self, bool ok)
void UnregisterCallHandler(const std::string &service_name, const std::shared_ptr< HealthCheckServiceImpl::CallHandler > &handler)
std::shared_ptr< CallHandler > handler_
static void CreateAndStart(ServerCompletionQueue *cq, DefaultHealthCheckService *database, HealthCheckServiceImpl *service)
HealthCheckServiceImpl * GetHealthCheckService(std::unique_ptr< ServerCompletionQueue > cq)
virtual ~CallHandler()=default
static bool DecodeRequest(const ByteBuffer &request, std::string *service_name)
grpc_core::Mutex cq_shutdown_mu_
Desriptor of an RPC service and its various RPC methods.
DefaultHealthCheckService * database_
grpc_core::Mutex send_mu_
std::unique_ptr< grpc_core::Thread > thread_
std::map< std::string, ServiceData > services_map_
std::string service_name_
static void CreateAndStart(ServerCompletionQueue *cq, DefaultHealthCheckService *database, HealthCheckServiceImpl *service)
DefaultHealthCheckService()
constexpr absl::remove_reference_t< T > && move(T &&t) noexcept
void OnFinishDone(std::shared_ptr< CallHandler > self, bool ok)
void OnCallReceived(std::shared_ptr< CallHandler > self, bool ok)
HealthCheckServiceImpl * service_
void AddCallHandler(std::shared_ptr< HealthCheckServiceImpl::CallHandler > handler)
void SendHealth(std::shared_ptr< CallHandler > self, ServingStatus status) override
HealthCheckServiceImpl(DefaultHealthCheckService *database, std::unique_ptr< ServerCompletionQueue > cq)
std::function< void(std::shared_ptr< CallHandler >, bool)> HandlerFunction
std::atomic_bool shutdown_
HealthCheckServiceImpl * service_
CheckCallHandler(ServerCompletionQueue *cq, DefaultHealthCheckService *database, HealthCheckServiceImpl *service)
ServingStatus GetServingStatus(const std::string &service_name) const
std::unique_ptr< ServerCompletionQueue > cq_
void RequestAsyncServerStreaming(int index, grpc::ServerContext *context, Message *request, internal::ServerAsyncStreamingInterface *stream, grpc::CompletionQueue *call_cq, grpc::ServerCompletionQueue *notification_cq, void *tag)
void OnFinishDone(std::shared_ptr< CallHandler > self, bool ok)
GenericServerAsyncWriter stream_
void SendHealth(std::shared_ptr< CallHandler >, ServingStatus) override
~HealthCheckServiceImpl() override
ServerCompletionQueue * cq_
void SetServingStatus(ServingStatus status)
WatchCallHandler(ServerCompletionQueue *cq, DefaultHealthCheckService *database, HealthCheckServiceImpl *service)
GenericServerAsyncResponseWriter writer_
void SendFinishLocked(std::shared_ptr< CallHandler > self, const Status &status)
std::set< std::shared_ptr< HealthCheckServiceImpl::CallHandler > > call_handlers_
void SendFinish(std::shared_ptr< CallHandler > self, const Status &status)
void RemoveCallHandler(const std::shared_ptr< HealthCheckServiceImpl::CallHandler > &handler)
void OnDoneNotified(std::shared_ptr< CallHandler > self, bool ok)
void OnSendHealthDone(std::shared_ptr< CallHandler > self, bool ok)
CallableTag on_done_notified_
virtual void SendHealth(std::shared_ptr< CallHandler > self, ServingStatus status)=0
static void Serve(void *arg)
ServingStatus pending_status_
__attribute__((deprecated("Please use GRPCProtoMethod."))) @interface ProtoMethod NSString * service
void StartServingThread()
static bool EncodeResponse(ServingStatus status, ByteBuffer *response)
static grpc_completion_queue * cq
HandlerFunction handler_function_
void SetServingStatus(const std::string &service_name, bool serving) override
Set or change the serving status of the given service_name.
grpc
Author(s):
autogenerated on Fri May 16 2025 02:58:09