Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Checker ¶
type Checker interface { // Liveness returns a handler that returns 200 OK if the server is alive (running). Liveness() http.HandlerFunc // Readiness returns a handler that returns 200 OK if the server is ready to accept traffic // and 503 Service Unavailable if the server is not ready to serve traffic. Readiness() http.HandlerFunc // SetReady should automatically be set to true when the server is ready to accept traffic. SetReady(isReady bool) }
Checker defines an interface that must be implemented by a health checker to determine if the router can currently accept traffic.
type Checks ¶
type Checks struct {
// contains filtered or unexported fields
}
func (*Checks) Liveness ¶
func (c *Checks) Liveness() http.HandlerFunc
Liveness returns a handler that returns 200 OK if the server is alive (running).
func (*Checks) Readiness ¶
func (c *Checks) Readiness() http.HandlerFunc
Readiness returns a handler that returns 200 OK if the server is ready to accept traffic and 503 Service Unavailable if the server is not ready to serve traffic.
Click to show internal directories.
Click to hide internal directories.