Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Checker ¶
type Checker interface { // IsDown returns true if the server is down. IsDown(serviceID string, key *types.RealServer_Key) bool // SetHealthCheck on the given server, replacing any existing health check. SetHealthCheck(serviceID string, key *types.RealServer_Key, check *types.RealServer_HealthCheck, fn TransitionFunc) error // RemHealthCheck for the given server. RemHealthCheck(serviceID string, key *types.RealServer_Key) // Stop all health checks. Use at shutdown. Stop() }
Checker checks if the real servers of a virtual service are up.
type ServerStatus ¶
type ServerStatus bool
ServerStatus of a server.
const ( // ServerUp if server is healthy. ServerUp ServerStatus = true // ServerDown if server is unhealthy. ServerDown ServerStatus = false )
type TransitionFunc ¶
type TransitionFunc func(state ServerStatus)
TransitionFunc is called on a health state change.
Click to show internal directories.
Click to hide internal directories.