AutoBreaker#
Circuit breaker for Go with percentage-based (adaptive) thresholds, runtime settings updates and built-in metrics.
See Why AutoBreaker in the README.
Quick Start#
| |
The Quick Start is in the README; the same code is compiled as the package Example.
Documentation#
Getting Started#
Guides#
- State Machine - State transition specification
- Concurrency - Lock-free implementation details
- Error Classification - Custom error handling
- Performance - Benchmarks and optimization
- Decision Guide - When to use AutoBreaker
- Migration - From sony/gobreaker
Reference#
- API Reference - Complete API documentation
- Examples - Runnable examples
- Contributing - How to contribute
- Security - Reporting a vulnerability
- Changelog - Release history
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.