Skip to content

CircuitBreakerStateProvider

Defined in: src/circuit-breaker.ts:228

Reads the state and window metrics of a single circuit breaker (health checks, dashboards, persistence).

new CircuitBreakerStateProvider(): CircuitBreakerStateProvider

CircuitBreakerStateProvider

get circuitState(): CircuitState

Defined in: src/circuit-breaker.ts:231

CircuitState


get isWarmingUp(): boolean

Defined in: src/circuit-breaker.ts:236

True during warmUpDuration, while failures are recorded but can’t open the circuit (opossum’s warmUp).

boolean


get metrics(): CircuitMetrics

Defined in: src/circuit-breaker.ts:240

CircuitMetrics

snapshot(): CircuitSnapshot

Defined in: src/circuit-breaker.ts:245

Current state, rolling window included, as plain JSON; pass it back as initialState to resume.

CircuitSnapshot