healthreporter

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 29, 2018 License: Apache-2.0 Imports: 5 Imported by: 10

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL