Documentation ¶
Index ¶
- func SetServingStatusNotServing(service string)
- func SetServingStatusServing(service string)
- type HealthTripleServer
- func (srv *HealthTripleServer) Check(ctx context.Context, req *triple_health.HealthCheckRequest) (*triple_health.HealthCheckResponse, error)
- func (srv *HealthTripleServer) Reference() string
- func (srv *HealthTripleServer) Resume()
- func (srv *HealthTripleServer) SetServingStatus(service string, servingStatus triple_health.HealthCheckResponse_ServingStatus)
- func (srv *HealthTripleServer) Shutdown()
- func (srv *HealthTripleServer) Watch(ctx context.Context, request *triple_health.HealthCheckRequest, ...) 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 HealthTripleServer ¶
type HealthTripleServer struct {
// contains filtered or unexported fields
}
func NewServer ¶
func NewServer() *HealthTripleServer
func (*HealthTripleServer) Check ¶
func (srv *HealthTripleServer) Check(ctx context.Context, req *triple_health.HealthCheckRequest) (*triple_health.HealthCheckResponse, error)
func (*HealthTripleServer) Reference ¶
func (srv *HealthTripleServer) Reference() string
func (*HealthTripleServer) Resume ¶
func (srv *HealthTripleServer) 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 (*HealthTripleServer) SetServingStatus ¶
func (srv *HealthTripleServer) SetServingStatus(service string, servingStatus triple_health.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 (*HealthTripleServer) Shutdown ¶
func (srv *HealthTripleServer) 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 (*HealthTripleServer) Watch ¶
func (srv *HealthTripleServer) Watch(ctx context.Context, request *triple_health.HealthCheckRequest, server triple_health.Health_WatchServer) error
Directories ¶
Path | Synopsis |
---|---|
Code generated by protoc-gen-triple.
|
Code generated by protoc-gen-triple. |
Click to show internal directories.
Click to hide internal directories.