@aligent/microservice-util-lib / RetryConfig
Configuration for the retryWrapper
• Optional
backoffAmount: number
The amount to increase the delay by each retry (in ms)
Default
0
retryWrapper/retryWrapper.ts:17
• Optional
delay: number
The base delay between retries (in ms)
Default
0
retryWrapper/retryWrapper.ts:12
• Optional
onRetry: (retries
: number
, error
: Error
, config
: RetryConfig
) => void
▸ (retries
, error
, config
): void
A callback to run before each retry
Name | Type | Description |
---|---|---|
retries |
number |
the number of retries so far (will start at 1) |
error |
Error |
the error from the last attempt |
config |
RetryConfig |
the configuration supplied to the retryWrapper |
void
retryWrapper/retryWrapper.ts:24
• Optional
retries: number
The number of retries to attempt after the first run
Default
1