agent/polling/index 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> -
pollForResponse(
Agent agent, Principal canisterId, RequestId requestId, PollStrategy strategy) → Future< BinaryBlob> -
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)