Skip to main content

Module circuit_breaker

Module circuit_breaker 

Source
Expand description

Per-proxy circuit breaker.

State machine:

CLOSED ──(failures ≥ threshold)──► OPEN
  ▲                                  │
  │                     (elapsed > half_open_after)
  │                                  ▼
(success)                        HALF_OPEN
  └──────────────────────────────────┘
                   or
HALF_OPEN ──(failure)──► OPEN  (timer reset)

Structs§

CircuitBreaker
Lightweight, lock-free per-proxy circuit breaker.

Constants§

STATE_CLOSED
STATE_HALF_OPEN
STATE_OPEN