Expand description
A small, domain-agnostic circuit breaker: closed/open/probing state driven
by consecutive-failure counting and a fixed cooldown. Deliberately free of
any cache-specific naming so it stays reusable (and so imetric!’s
literal-name requirement doesn’t leak into it) — state transitions are
returned to the caller, which owns the metrics and logs.
See tasks/1360_cache_client_circuit_breaker_plan.md (“The breaker”)
for the full design rationale.
Structs§
- Circuit
Breaker - Gates access to a flaky resource: trips after
failure_thresholdconsecutive unresponsive reports, stays open for a fixedcooldown, then admits exactly one probe request to test recovery. - Circuit
Breaker Config - Tunables for a
CircuitBreaker.
Enums§
- Admission
- What a caller may do with the guarded resource right now.
- Transition
- A state change worth reporting, returned so the caller emits its own metrics/logs and the breaker stays domain-agnostic.