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, opts ...Option) error
WaitForStateTransition waits for a resource to reach the desired state by polling its current state. The default poll interval is two seconds; pass WithPollInterval to customize it.
Types ¶
type Option ¶ added in v0.16.1
type Option func(*waitConfig)
Option customizes WaitForStateTransition behavior.
func WithPollInterval ¶ added in v0.16.1
WithPollInterval overrides the default polling interval. Useful for long-running resources (e.g. connector sync jobs) where a slower cadence is more appropriate than the default snappy 2-second tick.
type StateChecker ¶
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.
Click to show internal directories.
Click to hide internal directories.