Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Check ¶
type Check interface {
Name() string // Name returns the name of the component being checked.
// TODO_FUTURE: consider adding a message/reason for an unhealthy status.
IsAlive() bool // IsAlive returns true if the component is healthy, otherwise false.
}
health.Check is an interface that must be implemented by components that need to report their health status
type Checker ¶
type Checker struct {
Logger polylog.Logger
Components []Check
ServiceIDReporter ServiceIDReporter
}
health.Checker struct is used to store all PATH components whose health needs to be checked to consider PATH ready to serve traffic.
func (*Checker) HealthzHandler
deprecated
func (c *Checker) HealthzHandler(w http.ResponseWriter, req *http.Request)
healthCheckHandler returns the health status of PATH as a JSON response.
It will return a 200 OK status code if all components are ready or a 503 Service Unavailable status code if any component is not ready.
Deprecated: Use /health for liveness, /ready for readiness, and /config for configuration.
type ServiceIDReporter ¶
ServiceIDReporter is satisfied by the protocol instance and returns the list of service IDs that the protocol instance is configured for.