wait

package
v0.0.0-...-c0326d0 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Loop

func Loop(ctx context.Context, interval time.Duration, f func(context.Context))

Loop runs the given function immediately and at every interval until the context ends.

func Poll

func Poll(ctx context.Context, interval time.Duration, f func(context.Context) (bool, error)) error

Poll runs the given function at the start and again every interval until it either returns success (true and no error) or an error.

func PollValue

func PollValue[V any](ctx context.Context, interval time.Duration, f func(ctx context.Context) (V, bool, error)) (V, error)

PollValue runs the given function at the start and again every interval until it either returns success (value, true and no error) or an error.

func Until

func Until(ctx context.Context, interval time.Duration, f func(context.Context) error) error

Until runs the given function immediately and at every interval until the context ends or the function returns an error. It returns the error of the function or of the context.

Types

This section is empty.

Jump to

Keyboard shortcuts

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