Documentation
¶
Index ¶
Constants ¶
const ( Up status = "UP" Down status = "DOWN" )
Variables ¶
This section is empty.
Functions ¶
func LivenessProbe ¶
LivenessProbe sets the given Liveness probe to DOWN if any given Readiness probe is DOWN for more than 5 minutes.
This function typically runs in its own goroutine. The return parameter may be used for tests.
func ReadinessProbe ¶
ReadinessProbe runs any probe functions passed to it. If any of the tests fail the given probe is set to DOWN.
This function typically runs in its own goroutine. The return parameter may be used for tests.
func RunProbe ¶
RunProbe waits for status messages on the probe channel.
The probe status is updated to reflect the current status. The probe timestamp is also updated when the status is UP.
This function typically runs in its own goroutine. The return parameter may be used for tests.
func StartProbes ¶ added in v1.1.0
func StartProbes(pf ...ProbeFunc)
StartProbes is a convenience function to run the default Readiness and Liveness probes every 3 seconds using the given probe functions.
Types ¶
type Probe ¶
type Probe struct {
// contains filtered or unexported fields
}
func (*Probe) Chan ¶
func (p *Probe) Chan() chan<- status
Chan exposes the write end of the probe channel.