agent/polling/strategy library
Functions
-
backoff(
num startingThrottleInMsec, num backoffFactor) → PollStrategy -
chain(
List< PollStrategy> strategies) → PollStrategy -
conditionalDelay(
PollPredicate< bool> condition, int timeInMsec) → PollStrategy -
defaultStrategy(
) → PollStrategy -
maxAttempts(
int count) → PollStrategy -
once(
) → PollPredicate< bool> -
throttlePolling(
int throttleMilliseconds) → PollStrategy - Throttle polling. @param throttleMilliseconds
-
timeout(
Duration duration) → PollStrategy
Typedefs
-
PollPredicate<
T> = Future< T> Function(Principal canisterId, RequestId requestId, RequestStatusResponseStatus status) -
PollStrategy
= Future<
void> Function(Principal canisterId, RequestId requestId, RequestStatusResponseStatus status) - PollStrategyFactory = PollStrategy Function()