...

Package grpchealthchecking

import "k8s.io/kubernetes/test/images/agnhost/grpc-health-checking"
Overview
Index

Overview ▾

Package grpchealthchecking offers a tiny grpc health checking endpoint.

Variables

CmdGrpcHealthChecking is used by agnhost Cobra.

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,
}

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