backoff
constbackoff:object
Defined in: src/backoff.ts:27
Delay schedules as plain functions of the attempt number (0-based), for delayGenerator, waitFor({ interval }),
or your own loops: addRetry({ delayGenerator: backoff.exponential({ delay: '100ms', maxDelay: '10s', useJitter: 'full' }) }).
Type Declaration
Section titled “Type Declaration”constant
Section titled “constant”constant: (
options) => (attempt) =>number
Parameters
Section titled “Parameters”options
Section titled “options”Returns
Section titled “Returns”(attempt) => number
exponential
Section titled “exponential”exponential: (
options) => (attempt) =>number
Parameters
Section titled “Parameters”options
Section titled “options”BackoffOptions & object
Returns
Section titled “Returns”(attempt) => number
linear
Section titled “linear”linear: (
options) => (attempt) =>number
Parameters
Section titled “Parameters”options
Section titled “options”Returns
Section titled “Returns”(attempt) => number
sequence
Section titled “sequence”sequence: (
delays) => (attempt) =>number
A fixed list of delays (cockatiel’s IterableBackoff); the last one repeats: backoff.sequence(['100ms', '1s', '5s']).
Parameters
Section titled “Parameters”delays
Section titled “delays”readonly Duration[]
Returns
Section titled “Returns”(attempt) => number