Documentation
¶
Overview ¶
Package health is the single source of a service's health: probes are registered by kind, their composite status is cached in xprobe states, and grpc.health.v1, the HTTP probe endpoints and the Consul check all read the same states.
Each kind is driven by an xprobe runner, which serializes evaluation: a periodic tick and a Serving flip never interleave, so a slow check started before the gate opened cannot overwrite the fresher result.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Health ¶
type Health struct {
// contains filtered or unexported fields
}
Health owns probe states. The readiness state is the registry's "" entry, which grpc.health.v1 reports and Consul checks.
func New ¶
New creates the health component: every kind is evaluated each interval, one evaluation bounded by timeout (at most interval; 0 means interval).
func (*Health) GRPC ¶
func (h *Health) GRPC() hv1.HealthServer
GRPC is the grpc.health.v1 server over the cached readiness.