HasWaiterTrait
trait HasWaiterTrait
Contains reusable functionality for resources that have long operations which require waiting in order to reach a particular state.
Methods
Provides a blocking operation until the resource has reached a particular state. The method will enter a loop, requesting feedback from the remote API until it sends back an appropriate status.
Provides a blocking operation until the resource has reached a particular state. The method will enter a loop, executing the callback until TRUE is returned. This provides great flexibility.
Convenience method providing a blocking operation until the resource transitions to an
ACTIVE
status.
No description
Details
waitUntil(string $status, int $timeout = 60, int $sleepPeriod = 1)
Provides a blocking operation until the resource has reached a particular state. The method will enter a loop, requesting feedback from the remote API until it sends back an appropriate status.
waitWithCallback(callable $fn, int|bool $timeout = 60, int $sleepPeriod = 1)
Provides a blocking operation until the resource has reached a particular state. The method will enter a loop, executing the callback until TRUE is returned. This provides great flexibility.
waitUntilActive(int|bool $timeout = false)
Convenience method providing a blocking operation until the resource transitions to an
ACTIVE
status.