waitutils

package
v0.12.4-rc1 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Clock

type Clock interface {
	Now() time.Time
	Since(time.Time) time.Duration
	Sleep(time.Duration)
}

type RealClock

type RealClock struct {
}

func (RealClock) Now

func (RealClock) Now() time.Time

func (RealClock) Since

func (RealClock) Since(t time.Time) time.Duration

func (RealClock) Sleep

func (RealClock) Sleep(s time.Duration)

type Waiter

type Waiter struct {
	Name    string
	Timeout time.Duration
	Retries int
	Delay   time.Duration
	Check   func() (bool, error)
	Clock   Clock
}

If timeout is specified, waiter will honor it If retries == 0, waiter will wait forever

func (Waiter) Wait

func (this Waiter) Wait() error

Jump to

Keyboard shortcuts

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