ExponentialBackoff
Defined in: src/retry/backoff-strategy.ts:132
Exponential backoff: delay grows as baseMs * multiplier^(attempt-1),
capped at maxMs, then jittered.
Implements
Section titled “Implements”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new ExponentialBackoff(opts?): ExponentialBackoff;Defined in: src/retry/backoff-strategy.ts:138
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
opts | ExponentialBackoffOptions |
Returns
Section titled “Returns”ExponentialBackoff
Methods
Section titled “Methods”nextDelay()
Section titled “nextDelay()”nextDelay(ctx): number;Defined in: src/retry/backoff-strategy.ts:145
Returns the delay in milliseconds before the next attempt.
Must be a non-negative finite number. Implementations should treat
ctx.attempt < 1 as a programmer error.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
ctx | BackoffContext |
Returns
Section titled “Returns”number