Documentation ¶
Overview ¶
Package healthreporter provides polling wait functions.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WaitForHealthy ¶
func WaitForHealthy(ctx context.Context, h HealthReporter) error
WaitForHealthy waits until ctx is Done or h is Healthy, returning an error if h does not become healthy.
Types ¶
type HealthReporter ¶
type HealthReporter interface { // Component is the name used in errors. Name() string // Healthy returns nil if this is healthy, and an Error describing the problem if not healthy. // Healthy should respect Context's Done. Healthy(context.Context) error }
A HealthReporter knows its name and can check if it is healthy.
Click to show internal directories.
Click to hide internal directories.