Documentation ¶
Overview ¶
Package life helps manage life states for k8 applications. It exposes ready contexts and a handler for handling ready probes.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AliveOrDead ¶
func AliveOrDead() (context.Context, context.CancelFunc, bool)
AliveOrDead returns the alive context.
func NewHandler ¶
NewHandler returns a new http.Handler that response to probe message to GET /ready
func Ready ¶
func Ready() (result context.Context, resultCancel context.CancelFunc)
Ready blocks until SetReady is called with a valid context, then it returns the ready context.
func ReadyOrNot ¶
func ReadyOrNot() (context.Context, context.CancelFunc, bool)
ReadyOrNot is like Ready() except that it doesn't block. It returns true if ready, otherwise false.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.