Skip to content

Latest commit

 

History

History
90 lines (49 loc) · 2.02 KB

File metadata and controls

90 lines (49 loc) · 2.02 KB

@aligent/microservice-util-lib / RetryConfig

Interface: RetryConfig

Configuration for the retryWrapper

Table of contents

Properties

Properties

backoffAmount

Optional backoffAmount: number

The amount to increase the delay by each retry (in ms)

Default

0

Defined in

retryWrapper/retryWrapper.ts:17


delay

Optional delay: number

The base delay between retries (in ms)

Default

0

Defined in

retryWrapper/retryWrapper.ts:12


onRetry

Optional onRetry: (retries: number, error: Error, config: RetryConfig) => void

Type declaration

▸ (retries, error, config): void

A callback to run before each retry

Parameters
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
Returns

void

Defined in

retryWrapper/retryWrapper.ts:24


retries

Optional retries: number

The number of retries to attempt after the first run

Default

1

Defined in

retryWrapper/retryWrapper.ts:7