asyncutils

package
v0.12.2 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WaitForStateTransition

func WaitForStateTransition(ctx context.Context, resourceType, resourceId string, stateChecker StateChecker) error

WaitForStateTransition waits for a resource to reach the desired state by polling its current state. It uses exponential backoff with a maximum interval to avoid overwhelming the API.

Types

type StateChecker

type StateChecker func(ctx context.Context) (isDesiredState bool, err error)

StateChecker is a function that checks if a resource is in the desired state. It should return true if the resource is in the desired state, false otherwise, and any error that occurred during the check.

Jump to

Keyboard shortcuts

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