Changelog
phil/circuit-breakerAll notable changes to phil/circuit-breaker will be documented in this file.
Updates should follow the Keep a CHANGELOG principles.
NEXT - YYYY-MM-DD
Added
CircuitKey: what one breaker guards, lowercase ASCII segments separated by.,_or-, at most 87 bytes.CircuitPolicy: a failure rate threshold from 1 to 100 %, a minimum of calls that is the denominator, a fixed window, an open duration and the half-open successes that close the circuit; an optional slowness threshold in milliseconds and a slow call rate, so that calls lasting longer than the threshold open the circuit too;trips()in integer arithmetic,isSlow().CallOutcome: how one call went,succeeded()orfailed(), with its duration in milliseconds when the caller measured it.CircuitStateandCircuitSnapshot: the closed/open/half-open state machine as pure transitions of a policy and an instant —at(),record(),recordSuccess(),recordFailure(),permitsCalls()—,closed()andrestore(); the slow calls counted with the calls and failures of the window, a slow trial call opening the circuit again.CircuitStateStore, the port of the states shared by the processes; a state never stored or lost is closed.CircuitOverride, the port of the operator who forces a circuit open;CircuitOverrides, several overrides asked together, none forcing anything when empty.CircuitBreaker:isAvailable(),state(),record(),recordSuccess()andrecordFailure()over a store, an override and a PSR-20 clock, the time-driven transitions saved only when they change something, nothing recorded while forced open;CircuitBreakers, the breakers by key, each key declared once.CircuitBreakerException, implemented byInvalidCircuitandUnknownCircuit.- The benchmark of a breaker's ask and report, timed or not, a transition and a key.
- The documentation in
doc/, one file per topic, indexed by the README. CONTRIBUTING.md,SECURITY.mdandCODE_OF_CONDUCT.md.