poll

package
v0.0.0-...-cb42e1a Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WaitForConditionImmediately

func WaitForConditionImmediately(ctx context.Context, condition func(ctx context.Context) (bool, error)) error

WaitForConditionImmediately runs the function `condition` periodically to poll the status of a condition. It waits for either condition's first return value to be `true`, or for a timeout to be hit.

By default, this timeout is 1 minute, and `condition` is checked every second. These can be overridden with the `E2E_POLL_TIMEOUT` and `E2E_POLL_STEP_DURATION` environment variables.

func WaitForConditionImmediatelyJoiningErrors

func WaitForConditionImmediatelyJoiningErrors(ctx context.Context, condition func(ctx context.Context) (bool, error)) error

WaitForConditionImmediatelyJoiningErrors runs the function `condition` periodically to poll the status of a condition. It waits for either condition's first return value to be `true`, or for a timeout to be hit.

By default, this timeout is 1 minute, and `condition` is checked every second. These can be overridden with the `E2E_POLL_TIMEOUT` and `E2E_POLL_STEP_DURATION` environment variables.

The errors returned by the invocations of the `condition` function are collected and -if timeout is hit- returned as a Joined error.

Types

This section is empty.

Jump to

Keyboard shortcuts

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