/** * Provides an implementation of backoff algorithms to be used when waiting * between retries of a failing task. */ import { Millisecond } from "./units"; export declare const DEFAULT_EXPONENTIAL_BACKOFF_BASE_INTERVAL: Millisecond; export declare const DEFAULT_EXPONENTIAL_BACKOFF_MULTIPLIER = 2; export declare const DEFAULT_EXPONENTIAL_BACKOFF_MAX_JITTER: Millisecond; export declare const DEFAULT_EXPONENTIAL_BACKOFF_MAX: Millisecond; /** * Returns a function that calculates the backoff interval for each try after * a failure. * * For an explanation of the algorithm, see: * https://cloud.google.com/storage/docs/exponential-backoff * * @param n Is the try count, starts from 0 */ export declare function calculateExponentialBackoffInterval(baseInterval?: Millisecond, multiplier?: number, maxJitter?: Millisecond, maxBackoff?: Millisecond): (n: number) => Millisecond;