Skip to content

Commit bbdd94a

Browse files
authored
Merge pull request #10 from 1mb-dev/fix/ci-and-readme-polish
fix(ci): update Go matrix to 1.25/1.26, add When to Use This section
2 parents fd99865 + acf2e02 commit bbdd94a

2 files changed

Lines changed: 23 additions & 8 deletions

File tree

.github/workflows/ci.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
strategy:
1717
matrix:
1818
os: [ubuntu-latest, macos-latest, windows-latest]
19-
go: ['1.22', '1.23', '1.24']
19+
go: ['1.25', '1.26']
2020

2121
steps:
2222
- name: Checkout code
@@ -33,7 +33,7 @@ jobs:
3333
run: go test -v -short -race -coverprofile=coverage.out -covermode=atomic ./...
3434

3535
- name: Upload coverage
36-
if: matrix.os == 'ubuntu-latest' && matrix.go == '1.24'
36+
if: matrix.os == 'ubuntu-latest' && matrix.go == '1.26'
3737
uses: codecov/codecov-action@v5
3838
with:
3939
files: ./coverage.out
@@ -52,7 +52,7 @@ jobs:
5252
- name: Set up Go
5353
uses: actions/setup-go@v6
5454
with:
55-
go-version: '1.24'
55+
go-version: '1.26'
5656
cache: true
5757

5858
- name: Run tests with coverage
@@ -81,13 +81,13 @@ jobs:
8181
- name: Set up Go
8282
uses: actions/setup-go@v6
8383
with:
84-
go-version: '1.24'
84+
go-version: '1.26'
8585
cache: true
8686

8787
- name: golangci-lint
8888
uses: golangci/golangci-lint-action@v9
8989
with:
90-
version: latest
90+
version: v2.9.0
9191
args: --timeout=5m
9292

9393
- name: go fmt

README.md

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,28 @@ AutoBreaker uses **percentage-based thresholds** that adapt to request volume au
2222
- **Observability** - Metrics() and Diagnostics() APIs built-in
2323
- **Thread-Safe** - Lock-free atomic operations throughout
2424

25+
## When to Use This
26+
27+
Use AutoBreaker when your services handle variable traffic and you don't want to tune circuit breaker thresholds per environment.
28+
29+
**Choose AutoBreaker over [sony/gobreaker](https://github.com/sony/gobreaker) when:**
30+
- Your traffic varies 10x+ between environments or time of day -- adaptive thresholds handle this automatically
31+
- You need to change thresholds at runtime without restarting (`UpdateSettings` API)
32+
- You want built-in observability without wiring up custom callbacks (`Metrics`/`Diagnostics` APIs)
33+
34+
**Choose sony/gobreaker instead when:**
35+
- Static failure counts work for your traffic pattern (consistent, predictable load)
36+
- You need the widest possible community adoption and ecosystem integrations
37+
38+
AutoBreaker is API-compatible with sony/gobreaker. Set `AdaptiveThreshold: true` to get percentage-based detection on top of the familiar interface.
39+
2540
## Installation
2641

2742
```bash
2843
go get github.com/1mb-dev/autobreaker
2944
```
3045

31-
Requires Go 1.21 or later.
46+
Requires Go 1.24 or later.
3247

3348
## Quick Start
3449

@@ -147,11 +162,11 @@ OnStateChange: func(name string, from, to State) {
147162

148163
## Status
149164

150-
**Production-Ready** - v1.1.1
165+
**Production-Ready** - v1.1.2
151166

152167
- 102 tests, 97.1% coverage, race detector clean
153168
- Zero dependencies, zero allocations in hot path
154-
- Compatible with Go 1.21+
169+
- Compatible with Go 1.24+
155170

156171
See [Roadmap](https://1mb-dev.github.io/autobreaker/guides/roadmap/) for future plans.
157172

0 commit comments

Comments
 (0)