Documentation
¶
Index ¶
- func ExponentialBackoffLoop(ctx context.Context, timeout, baseInterval, maxInterval time.Duration, ...) error
- func WaitForAsyncJob(ctx context.Context, resultPath string, port int, timeout time.Duration, ...) (*client.CommandResponse, error)
- func WaitForFile(ctx context.Context, resultPath string, port int, timeout time.Duration, ...) (*client.CommandResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExponentialBackoffLoop ¶
func ExponentialBackoffLoop(ctx context.Context, timeout, baseInterval, maxInterval time.Duration, condition func() bool) error
ExponentialBackoffLoop sleeps in exponentially-backed-off intervals, calling condition each tick. It returns nil as soon as condition reports true, or an error once timeout expires. The first sleep happens before the first condition check, matching the behaviour of the original status polling loops.
func WaitForAsyncJob ¶
func WaitForFile ¶
func WaitForFile(ctx context.Context, resultPath string, port int, timeout time.Duration, opName string) (*client.CommandResponse, error)
WaitForFile polls a filesystem result file until it appears, Unity stops, or the timeout expires. It uses exponential backoff starting at 100 ms and capping at 1.5 s to avoid burning I/O on long-running operations.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.