wait

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2018 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	// Maximal wait duration
	AtMost time.Duration
	// Poll interval used to delay next invocation of readinessProbe function
	PollInterval time.Duration
	// Logger used in the wait
	Logger *log.Logger
}

Options defines wait parameters.

type Wait

type Wait struct {
	// contains filtered or unexported fields
}

Wait holds wait parameters and provides defaults when Options parameters were not defined.

func NewWait

func NewWait(options Options) Wait

NewWait creates a new Wait

func (*Wait) GetAtMost

func (r *Wait) GetAtMost() time.Duration

GetAtMost provides maximal wait duration

func (*Wait) GetLogger

func (r *Wait) GetLogger(componentName string) *log.Logger

GetLogger provides wait logger

func (*Wait) GetPollInterval

func (r *Wait) GetPollInterval() time.Duration

GetPollInterval provides poll interval between readinessProbe invocation

func (*Wait) Poll

func (r *Wait) Poll(componentName string, readinessProbe func() error) error

Poll invokes readinessProbe until it provides no error or timeout is reached

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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