RetryPolicy
RetryPolicy<
E> =object
Defined in: Types/RetryPolicy.ts:17
An immutable policy describing retry limits, backoff delay strategies, transient failure filters, and observational telemetry.
Example
Section titled “Example”Type Parameters
Section titled “Type Parameters”E = unknown
Properties
Section titled “Properties”attempts
Section titled “attempts”
readonlyattempts:number
Defined in: Types/RetryPolicy.ts:18
getDelay
Section titled “getDelay”
readonlygetDelay: (attempt) =>Duration
Defined in: Types/RetryPolicy.ts:19
Parameters
Section titled “Parameters”attempt
Section titled “attempt”number
Returns
Section titled “Returns”onRetry?
Section titled “onRetry?”
readonlyoptionalonRetry?: (metadata) =>void
Defined in: Types/RetryPolicy.ts:21
Parameters
Section titled “Parameters”metadata
Section titled “metadata”Metadata<E>
Returns
Section titled “Returns”void
readonlyoptionalwhen?: (error) =>boolean
Defined in: Types/RetryPolicy.ts:20
Parameters
Section titled “Parameters”E
Returns
Section titled “Returns”boolean