CircuitBreakerStateProvider
Defined in: src/circuit-breaker.ts:228
Reads the state and window metrics of a single circuit breaker (health checks, dashboards, persistence).
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new CircuitBreakerStateProvider():
CircuitBreakerStateProvider
Returns
Section titled “Returns”CircuitBreakerStateProvider
Accessors
Section titled “Accessors”circuitState
Section titled “circuitState”Get Signature
Section titled “Get Signature”get circuitState():
CircuitState
Defined in: src/circuit-breaker.ts:231
Returns
Section titled “Returns”isWarmingUp
Section titled “isWarmingUp”Get Signature
Section titled “Get Signature”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).
Returns
Section titled “Returns”boolean
metrics
Section titled “metrics”Get Signature
Section titled “Get Signature”get metrics():
CircuitMetrics
Defined in: src/circuit-breaker.ts:240
Returns
Section titled “Returns”Methods
Section titled “Methods”snapshot()
Section titled “snapshot()”snapshot():
CircuitSnapshot
Defined in: src/circuit-breaker.ts:245
Current state, rolling window included, as plain JSON; pass it back as initialState to resume.