package health
import "github.com/docker/swarmkit/manager/health"
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 ¶
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.
Source Files ¶
- Version
- v1.12.0 (latest)
- Published
- Jul 26, 2016
- Platform
- linux/amd64
- Imports
- 5 packages
- Last checked
- 4 hours ago –
Tools for package owners.