Documentation ¶
Overview ¶
Package health provides a service that exposes server's health and it must be imported to enable support for client-side health checks.
Index ¶
- func SetServingStatusNotServing(service string)
- func SetServingStatusServing(service string)
- type DubbogoHealthServer
- func (s *DubbogoHealthServer) Check(ctx context.Context, in *healthpb.HealthCheckRequest) (*healthpb.HealthCheckResponse, error)
- func (s *DubbogoHealthServer) Resume()
- func (s *DubbogoHealthServer) SetServingStatus(service string, servingStatus healthpb.HealthCheckResponse_ServingStatus)
- func (s *DubbogoHealthServer) Shutdown()
- func (s *DubbogoHealthServer) Watch(in *healthpb.HealthCheckRequest, stream healthpb.Health_WatchServer) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetServingStatusNotServing ¶
func SetServingStatusNotServing(service string)
func SetServingStatusServing ¶
func SetServingStatusServing(service string)
Types ¶
type DubbogoHealthServer ¶
type DubbogoHealthServer struct { healthpb.UnimplementedHealthServer // contains filtered or unexported fields }
Server implements `service Health`.
func (*DubbogoHealthServer) Check ¶
func (s *DubbogoHealthServer) Check(ctx context.Context, in *healthpb.HealthCheckRequest) (*healthpb.HealthCheckResponse, error)
Check implements `service Health`.
func (*DubbogoHealthServer) Resume ¶
func (s *DubbogoHealthServer) Resume()
Resume sets all serving status to SERVING, and configures the server to accept all future status changes.
This changes serving status for all services. To set status for a particular services, call SetServingStatus().
func (*DubbogoHealthServer) SetServingStatus ¶
func (s *DubbogoHealthServer) SetServingStatus(service string, servingStatus healthpb.HealthCheckResponse_ServingStatus)
SetServingStatus is called when need to reset the serving status of a service or insert a new service entry into the statusMap.
func (*DubbogoHealthServer) Shutdown ¶
func (s *DubbogoHealthServer) Shutdown()
Shutdown sets all serving status to NOT_SERVING, and configures the server to ignore all future status changes.
This changes serving status for all services. To set status for a particular services, call SetServingStatus().
func (*DubbogoHealthServer) Watch ¶
func (s *DubbogoHealthServer) Watch(in *healthpb.HealthCheckRequest, stream healthpb.Health_WatchServer) error
Watch implements `service Health`.