wait

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: May 22, 2023 License: MPL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrWaitTimeout = errors.New("timeout waiting for condition")

ErrWaitTimeout is an error when a condition hasn't been met within the supplied max wait duration.

Functions

func ForCondition

func ForCondition(conditionFn ConditionFunc, maxWait time.Duration, checkInternal time.Duration) error

ForCondition will wait for the specified condition to be true until the max duration.

Types

type ConditionFunc

type ConditionFunc func() (bool, error)

ConditionFunc is a function type that is used to implement a wait condition.

func FileExistsCondition

func FileExistsCondition(filepath string, fs afero.Fs) ConditionFunc

FileExistsCondition creates a condition check on the existence of a file.

Jump to

Keyboard shortcuts

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