Skip to content

CircuitBreakerSettings

Defined in: src/pattern/CircuitBreaker.ts:3

readonly optional callTimeoutMs?: number

Defined in: src/pattern/CircuitBreaker.ts:9

Per-call timeout; exceeding this counts as a failure.


readonly optional isFailure?: (err) => boolean

Defined in: src/pattern/CircuitBreaker.ts:11

Optional: classify errors as non-failures to bypass breaker counting.

Error

boolean


readonly maxFailures: number

Defined in: src/pattern/CircuitBreaker.ts:5

Consecutive failures before the breaker opens. Must be >= 1.


readonly resetTimeoutMs: number

Defined in: src/pattern/CircuitBreaker.ts:7

How long the breaker stays open before letting a probe through. ms.