Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GRPCProbe ¶
type GRPCProbe struct {
// contains filtered or unexported fields
}
GRPCProbe represents health and readiness status of given component, and provides GRPC integration.
func NewGRPC ¶
func NewGRPC() *GRPCProbe
NewGRPC creates a Probe that wrapped around grpc/healt.Server which reflects status of server.
func (*GRPCProbe) HealthServer ¶
HealthServer returns a gRPC health server which responds readiness and liveness checks.
func (*GRPCProbe) Healthy ¶
func (p *GRPCProbe) Healthy()
Healthy sets components status to healthy.
func (*GRPCProbe) NotHealthy ¶
NotHealthy sets components status to not healthy with given error as a cause.
type Probe ¶
Prober represents health and readiness status of given component.
From Kubernetes documentation https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/ :
liveness (healthy): Many applications running for long periods of time eventually transition to broken states, and cannot recover except by being restarted. Kubernetes provides liveness probes to detect and remedy such situations.
readiness (ready): Sometimes, applications are temporarily unable to serve traffic. For example, an application might need to load large data or configuration files during startup, or depend on external services after startup. In such cases, you don’t want to kill the application, but you don’t want to send it requests either. Kubernetes provides readiness probes to detect and mitigate these situations. A pod with containers reporting that they are not ready does not receive traffic through Kubernetes Services.