Documentation
¶
Index ¶
- func ExponentialBackoffLoop(timeout, baseInterval, maxInterval time.Duration, condition func() bool) error
- func WaitForAsyncJob(resultPath string, port int, timeout time.Duration, opName string) (*client.CommandResponse, error)
- func WaitForFile(resultPath string, port int, timeout time.Duration, opName string) (*client.CommandResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExponentialBackoffLoop ¶
func ExponentialBackoffLoop(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 WaitForAsyncJob(resultPath string, port int, timeout time.Duration, opName string) (*client.CommandResponse, error)
WaitForAsyncJob wraps WaitForFile with log suppression for the known-harmless "Unsolicited response received on idle HTTP channel" noise that Go's net/http emits when Unity drops the connection during a domain reload.
func WaitForFile ¶
func WaitForFile(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.