gRPC Health Checking

Module Contents

class grpc_health.v1.health.HealthServicer(experimental_non_blocking=True, experimental_thread_pool=None)[source]

Servicer handling RPCs for service statuses.

enter_graceful_shutdown()[source]

Permanently sets the status of all services to NOT_SERVING.

This should be invoked when the server is entering a graceful shutdown period. After this method is invoked, future attempts to set the status of a service will be ignored.

This is an EXPERIMENTAL API.

set(service, status)[source]

Sets the status of a service.

Parameters:
  • service – string, the name of the service. NOTE, ‘’ must be set.
  • status – HealthCheckResponse.status enum value indicating the status of the service