No description
- Go 91.5%
- Makefile 6.6%
- Dockerfile 1.9%
|
|
||
|---|---|---|
| .github/workflows | ||
| cmd/module | ||
| internal | ||
| .env.example | ||
| .gitignore | ||
| .golangci.yml | ||
| CHANGELOG.md | ||
| COMPATIBILITY.md | ||
| Dockerfile | ||
| go.mod | ||
| go.sum | ||
| LICENSE | ||
| Makefile | ||
| muxcore.json | ||
| README.md | ||
Circuit Breaker Simple
In-memory circuit breaker with configurable failure threshold and auto-recovery cooldown for protecting remote calls from cascading failures.
Key Features
- Configurable failure threshold before circuit opens
- Auto-recovery cooldown into half-open, then closed on success or re-open on failure
- Per-circuit state tracking by key
- gRPC service (
State,RecordSuccess,RecordFailure,Reset)
Configuration
| Env Var | Default | Description |
|---|---|---|
CB_GRPC_ADDR |
:9640 |
gRPC listen address |
CB_FAILURE_THRESHOLD |
5 |
Failures before circuit opens |
CB_COOLDOWN |
30s |
Duration before half-open state |
MUXCORE_INSECURE_DISABLE_TLS |
unset | Set true to disable TLS for module SDK |
Capability
circuitbreaker, circuitbreaker.simple — In-memory circuit breaker
Dependencies
github.com/Muxcore-Media/core— MuxCore contracts, proto, module SDK