https://github.com/tessellator/resilience4clj-timelimiter
A small Clojure wrapper around the resilience4j TimeLimiter module
https://github.com/tessellator/resilience4clj-timelimiter
clojure resilience resilience4j time-limit timeout
Last synced: 12 months ago
JSON representation
A small Clojure wrapper around the resilience4j TimeLimiter module
- Host: GitHub
- URL: https://github.com/tessellator/resilience4clj-timelimiter
- Owner: tessellator
- License: epl-2.0
- Created: 2020-02-20T05:24:48.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-02-20T05:29:20.000Z (over 6 years ago)
- Last Synced: 2025-07-10T10:37:07.351Z (about 1 year ago)
- Topics: clojure, resilience, resilience4j, time-limit, timeout
- Language: Clojure
- Size: 9.77 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# resilience4clj-timelimiter
A small Clojure wrapper around the
[resilience4j TimeLimiter module](https://resilience4j.readme.io/docs/timeout).
Requires Clojure 1.9 or later.
[](https://clojars.org/tessellator/resilience4clj-timelimiter)
[](https://cljdoc.org/d/tessellator/resilience4clj-timelimiter/CURRENT)
## Quick Start
The following code defines a function `perform-calculation` that uses a time
limiter named `:some-name` and stored in the global registry. If the time
limiter does not already exist, one is created.
```clojure
(ns myproject.some-client
(:require [resilience4clj.time-limiter :refer [with-time-limiter]])
(defn perform-calculation []
(with-time-limiter :some-name
;; some expensive calculations
))
```
Refer to the [configuration guide](/doc/01_configuration.md) for more
information on how to configure the global registry as well as individual
time limiters.
Refer to the [usage guide](/doc/02_usage.md) for more information on how to
use time limiters.
## License
Copyright © 2020 Thomas C. Taylor and contributors.
Distributed under the Eclipse Public License version 2.0.