wait

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	BackOffTime = 5 * time.Second
)

Functions

func Race

func Race(ctx context.Context, timeout time.Duration, workers []Worker) error

Race multiple worker functions each in a goroutine. The first worker to return commits the result of the Race function. All workers must return when the context is closed before the Race function will return.

func UntilCondition

func UntilCondition(ctx context.Context, watchClient client.WithWatch, target types.NamespacedName, listType client.ObjectList, condition ConditionFunc) error

func UntilDelete

func UntilDelete(ctx context.Context, c client.Client, obj client.Object) error

Types

type ConditionFunc

type ConditionFunc = func(client.Object) (bool, error)

type Worker

type Worker func(context.Context) error

Jump to

Keyboard shortcuts

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