Skip to content

CircuitSnapshot

Defined in: src/queue/circuit-breaker.ts:18

Point-in-time view of one partition’s circuit breaker, as returned by client.circuits(). A plain copy: mutating it doesn’t affect the breaker.

partition: string

Defined in: src/queue/circuit-breaker.ts:19


state: "closed" | "open" | "half_open"

Defined in: src/queue/circuit-breaker.ts:22

An open circuit whose nextAttemptAt has passed stays open until the next request arrives; that request is admitted as the half-open trial.


failures: number

Defined in: src/queue/circuit-breaker.ts:24

Consecutive failures, or failures in the rolling window when window is set.


optional openedAt?: number

Defined in: src/queue/circuit-breaker.ts:26

Epoch ms when the circuit last opened. Absent while closed.


optional nextAttemptAt?: number

Defined in: src/queue/circuit-breaker.ts:28

Epoch ms when an open circuit admits its next trial (openedAt + resetTimeoutMs). Absent while closed.