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 test 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 if the recieved status differs from the current status. The probe timestamp is also updated when the status changes to DOWN.
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(tests ...func() error)
StartProbes is a convenience function to run the default Readiness and Liveness probes and test them every 3*time.Second using the given test functions.