agent/polling/strategy library

Constants

FIVE_MINUTES_IN_MSEC → const int

Functions

backoff(num startingThrottleInMsec, num backoffFactor) PollStrategy
chain(List<PollStrategy> strategies) PollStrategy
conditionalDelay(Predicate<bool> condition, int timeInMsec) PollStrategy
defaultStrategy() PollStrategy
maxAttempts(int count) PollStrategy
once() Predicate<bool>
throttle(int throttleInMsec) PollStrategy
Throttle polling. @param throttleInMsec Amount in millisecond to wait between each polling.
timeout(int timeInMsec) PollStrategy

Typedefs

PollStrategy = Future<void> Function(Principal canisterId, RequestId requestId, String status)
PollStrategyFactory = PollStrategy Function()
Predicate<T> = Future<T> Function(Principal canisterId, RequestId requestId, String status)