async/exponential_backoff_utils library
Exponential backoff helper (roadmap #677).
Constants
- exponentialBackoffDefaultBase → const Duration
- Default base delay for exponential backoff.
Functions
-
exponentialBackoff(
int attempt, {Duration base = exponentialBackoffDefaultBase, Duration? maxDelay}) → Duration -
Returns delay for attempt
attempt(0-based): base * 2^attempt, capped atmaxDelay.