RetryPolicy
RetryPolicy:
object
Defined in: Types/RetryPolicy.ts:14
Type Declaration
Section titled “Type Declaration”constant
Section titled “constant”constant: (
options) =>RetryPolicy
Creates a RetryPolicy with a constant delay between retry attempts.
Parameters
Section titled “Parameters”options
Section titled “options”attempts
Section titled “attempts”number
Returns
Section titled “Returns”Example
Section titled “Example”exponential
Section titled “exponential”exponential: (
options) =>RetryPolicy
Creates a RetryPolicy with exponential backoff delays between attempts.
An optional factor (default 2) controls the growth rate.
An optional jitter (default false) adds randomized variance to prevent thundering herd problems.
Parameters
Section titled “Parameters”options
Section titled “options”attempts
Section titled “attempts”number
factor?
Section titled “factor?”number
initial
Section titled “initial”jitter?
Section titled “jitter?”boolean