CircuitSnapshot
Defined in: src/circuit-breaker.ts:208
JSON-serializable breaker state, for persisting across restarts and serverless invocations.
Properties
Section titled “Properties”consecutiveFailures
Section titled “consecutiveFailures”
readonlyconsecutiveFailures:number
Defined in: src/circuit-breaker.ts:212
halfOpenAttempts
Section titled “halfOpenAttempts”
readonlyhalfOpenAttempts:number
Defined in: src/circuit-breaker.ts:213
openUntil
Section titled “openUntil”
readonlyopenUntil:number
Defined in: src/circuit-breaker.ts:211
Epoch ms when an open circuit lets a probe through.
readonlystate:CircuitState
Defined in: src/circuit-breaker.ts:209
updatedAt?
Section titled “updatedAt?”
readonlyoptionalupdatedAt?:number
Defined in: src/circuit-breaker.ts:215
Epoch ms of the last state change; decides which instance’s state wins in a shared store.
window?
Section titled “window?”
readonlyoptionalwindow?:unknown
Defined in: src/circuit-breaker.ts:217
Rolling-window contents (the policy’s snapshot()), restored by initialState so failure history survives a restart.