Documentation ¶
Overview ¶
Package grpchealthchecking offers a tiny grpc health checking endpoint.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var CmdGrpcHealthChecking = &cobra.Command{ Use: "grpc-health-checking", Short: "Starts a simple grpc health checking endpoint", Long: "Starts a simple grpc health checking endpoint with --port to serve on and --service to check status for. The endpoint returns SERVING for the first --delay-unhealthy-sec, and NOT_SERVING after this. NOT_FOUND will be returned for the requests for non-configured service name. Probe can be forced to be set NOT_SERVING by calling /make-not-serving http endpoint.", Args: cobra.MaximumNArgs(0), Run: main, }
CmdGrpcHealthChecking is used by agnhost Cobra.
Functions ¶
This section is empty.
Types ¶
type HealthChecker ¶
type HealthChecker struct {
// contains filtered or unexported fields
}
func NewHealthChecker ¶
func NewHealthChecker(started time.Time) *HealthChecker
func (*HealthChecker) Check ¶
func (s *HealthChecker) Check(ctx context.Context, req *grpc_health_v1.HealthCheckRequest) (*grpc_health_v1.HealthCheckResponse, error)
func (*HealthChecker) Watch ¶
func (s *HealthChecker) Watch(req *grpc_health_v1.HealthCheckRequest, server grpc_health_v1.Health_WatchServer) error
Click to show internal directories.
Click to hide internal directories.