AutoBreaker#

Circuit breaker for Go with percentage-based (adaptive) thresholds, runtime settings updates and built-in metrics.

Go Reference CI Go Report Card

See Why AutoBreaker in the README.

Quick Start#

1
go get github.com/1mb-dev/autobreaker

The Quick Start is in the README; the same code is compiled as the package Example.

Documentation#

Getting Started#

Guides#

Reference#

Performance#

Per-state latency and allocations, with the CPU and Go version they were measured on, are in the Performance Guide.

Examples#

Examples in the examples/ directory:

  • production_ready - HTTP client integration, recommended starting point
  • runtime_config - Dynamic configuration updates (file, API, signals)
  • observability - Monitoring, metrics, and diagnostics
  • adaptive - Adaptive vs static threshold comparison
  • custom_errors - Custom error classification

License#

MIT License - see LICENSE file.

Contributing#

Open an issue before submitting a change; see the Contributing Guide.