-
feat: wire the circuit breaker into the proxy fetch path (#90)
ci/woodpecker/tag/docker Pipeline was successfulreleased this
2026-07-02 22:43:22 +10:00 | 26 commits to master since this releaseFixes #74
Why
internal/proxy/circuit.goimplemented and tested a circuit breaker, but nothing ever called it — a repeatedly-failing upstream was still hit on every request.Changes
- Construct a
CircuitBreakerinNewEngine. - In
Engine.Fetch: short-circuit when the breaker is open (serve stale from the store if present, otherwise return 503),RecordFailureon eachUpstreamError, andRecordSuccesson a successful fetch.
Validation
go test ./internal/proxy/andmake e2epass.
Co-authored-by: BenVincent benvin@main.unkin.net
Reviewed-on: #90
Co-authored-by: Ben Vincent ben@unkin.net
Co-committed-by: Ben Vincent ben@unkin.netDownloads
- Construct a