Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tessellator/resilience4clj-circuitbreaker
A small Clojure wrapper around the resilience4j CircuitBreaker module
https://github.com/tessellator/resilience4clj-circuitbreaker
circuitbreaker clojure resilience resilience4j
Last synced: about 1 month ago
JSON representation
A small Clojure wrapper around the resilience4j CircuitBreaker module
- Host: GitHub
- URL: https://github.com/tessellator/resilience4clj-circuitbreaker
- Owner: tessellator
- License: epl-2.0
- Created: 2019-07-22T06:28:27.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2022-04-01T00:51:23.000Z (over 2 years ago)
- Last Synced: 2024-10-28T13:40:33.564Z (about 2 months ago)
- Topics: circuitbreaker, clojure, resilience, resilience4j
- Language: Clojure
- Homepage:
- Size: 37.1 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- stars - tessellator/resilience4clj-circuitbreaker - A small Clojure wrapper around the resilience4j CircuitBreaker module \[*Eclipse Public License 2.0*\] (⭐️4) (Clojure)
- stars - tessellator/resilience4clj-circuitbreaker - A small Clojure wrapper around the resilience4j CircuitBreaker module \[*Eclipse Public License 2.0*\] (⭐️4) (Clojure)
README
# resilience4clj-circuitbreaker
A small Clojure wrapper around the
[resilience4j CircuitBreaker module](https://resilience4j.readme.io/docs/circuitbreaker).Requires Clojure 1.5 or later for JDK 8, and Clojure 1.10 or later for JDK 9+.
[![clojars badge](https://img.shields.io/clojars/v/tessellator/resilience4clj-circuitbreaker.svg)](https://clojars.org/tessellator/resilience4clj-circuitbreaker)
[![cljdoc badge](https://cljdoc.org/badge/tessellator/resilience4clj-circuitbreaker)](https://cljdoc.org/d/tessellator/resilience4clj-circuitbreaker/CURRENT)## Quick Start
The following code defines a function `make-remote-call` that uses a circuit
breaker named `:some-name` and stored in the default registry. If the circuit
breaker does not already exist, one is created.```clojure
(ns myproject.some-client
(:require [clj-http.client :as http]
[resilience4clj.circuit-breaker :refer [with-circuit-breaker]])(defn make-remote-call []
(with-circuit-breaker :some-name
(http/get "https://www.example.com")))
```Refer to the [configuration guide](/doc/01_configuration.md) for more
information on how to configure the default registry as well as individual
circuit breakers.Refer to the [usage guide](/doc/02_usage.md) for more information on how to
use circuit breakers to protect code as well as how to manually manage the state
on a circuit breaker.## License
Copyright © 2019-2022 Thomas C. Taylor and contributors.
Distributed under the Eclipse Public License version 2.0.