redeye-breaker 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -0
- package/package.json +4 -2
package/README.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# redeye
|
|
2
2
|
|
|
3
|
+
[](https://github.com/laurells/redeye/actions/workflows/ci.yml)
|
|
4
|
+
[](https://www.npmjs.com/package/redeye-breaker)
|
|
5
|
+
[](LICENSE)
|
|
6
|
+
|
|
3
7
|
A circuit breaker for Node.js with an optional **distributed mode**: instead of tracking failures only in the memory of one process, breaker state lives in Redis (or any store you plug in), so a failure burst against a downstream dependency trips the breaker for *every* instance sharing that store — not just the one that saw the failures.
|
|
4
8
|
|
|
5
9
|
When paired with `RedisStore`, redeye is a *reliable* distributed circuit breaker, not just a best-effort one: failure counting is atomic (a Redis Lua script, not a racy get-then-set), and recovery goes through a real half-open state where exactly one instance gets to try the dependency again while everyone else stays blocked — the two properties most local-only or naively-distributed circuit breakers skip.
|
|
@@ -198,6 +202,10 @@ docker compose down
|
|
|
198
202
|
|
|
199
203
|
It connects to `REDIS_URL` (default `redis://localhost:6379`).
|
|
200
204
|
|
|
205
|
+
## Contributing
|
|
206
|
+
|
|
207
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md). Changes are tracked in [CHANGELOG.md](CHANGELOG.md).
|
|
208
|
+
|
|
201
209
|
## License
|
|
202
210
|
|
|
203
211
|
MIT
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "redeye-breaker",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "A circuit breaker for Node.js with an optional Redis-backed distributed mode, so breaker state can be shared across multiple app instances instead of being tracked per-process.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -19,7 +19,9 @@
|
|
|
19
19
|
},
|
|
20
20
|
"typesVersions": {
|
|
21
21
|
"*": {
|
|
22
|
-
"redis-store": [
|
|
22
|
+
"redis-store": [
|
|
23
|
+
"dist/stores/redis-store.d.ts"
|
|
24
|
+
]
|
|
23
25
|
}
|
|
24
26
|
},
|
|
25
27
|
"scripts": {
|