Skip to main content

CircuitBreakerConfig

Upgather SDK


Upgather SDK / CircuitBreakerConfig

Interface: CircuitBreakerConfig

Defined in: lib/factories/ClientFactory.ts:21

Configuration options for circuit breaker.

Extends

  • CircuitBreakerOptions

Properties

coolingPeriodMs?

optional coolingPeriodMs: number

Defined in: lib/error/CircuitBreakerErrorHandling.ts:18

Cooling period in ms before trying again (default: 30000)

Inherited from

CircuitBreakerOptions.coolingPeriodMs


enabled

enabled: boolean

Defined in: lib/factories/ClientFactory.ts:22


failureThreshold?

optional failureThreshold: number

Defined in: lib/error/CircuitBreakerErrorHandling.ts:16

Failure threshold before opening circuit (default: 5)

Inherited from

CircuitBreakerOptions.failureThreshold


logger?

optional logger: LoggerInterface

Defined in: lib/error/CircuitBreakerErrorHandling.ts:22

Optional logger instance for circuit breaker events

Inherited from

CircuitBreakerOptions.logger


namespace?

optional namespace: string

Defined in: lib/error/CircuitBreakerErrorHandling.ts:20

Optional namespace for isolating circuit breakers in different parts of the app

Inherited from

CircuitBreakerOptions.namespace


serviceKeyExtractor()?

optional serviceKeyExtractor: (url) => string

Defined in: lib/error/CircuitBreakerErrorHandling.ts:14

Function to extract service key from the URL

Parameters

url

string

Returns

string

Inherited from

CircuitBreakerOptions.serviceKeyExtractor