Documentation ¶
Overview ¶
Package health provides some utility functions to health-check a server. The implementation is based on protobuf. Users need to write their own implementations if other IDLs are used.
See original source: https://github.com/grpc/grpc-go/blob/master/health/health.go
We use our own implementation of grpc server health check to include the authorization wrapper necessary for the Managers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server represents a Health Check server to check if a service is running or not on some host.
func NewHealthServer ¶
func NewHealthServer() *Server
NewHealthServer creates a new health check server for grpc services.
func (*Server) Check ¶
func (s *Server) Check(ctx context.Context, in *api.HealthCheckRequest) (*api.HealthCheckResponse, error)
Check checks if the grpc server is healthy and running.
func (*Server) SetServingStatus ¶
func (s *Server) SetServingStatus(service string, status api.HealthCheckResponse_ServingStatus)
SetServingStatus is called when need to reset the serving status of a service or insert a new service entry into the statusMap.