Skip to main content

CircuitBreakerConfig

Upgather SDK


Upgather SDK / CircuitBreakerConfig

Interface: CircuitBreakerConfig

Configuration options for circuit breaker.

Extends

Properties

coolingPeriodMs?

optional coolingPeriodMs: number

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

Inherited from

CircuitBreakerOptions.coolingPeriodMs


enabled

enabled: boolean


failureThreshold?

optional failureThreshold: number

Failure threshold before opening circuit (default: 5)

Inherited from

CircuitBreakerOptions.failureThreshold


logger?

optional logger: LoggerInterface

Optional logger instance for circuit breaker events

Inherited from

CircuitBreakerOptions.logger


namespace?

optional namespace: string

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

Inherited from

CircuitBreakerOptions.namespace


serviceKeyExtractor()?

optional serviceKeyExtractor: (url) => string

Function to extract service key from the URL

Parameters

url

string

Returns

string

Inherited from

CircuitBreakerOptions.serviceKeyExtractor