Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/killme2008/ring-jetty-hystrix-adapter
Setup a Hystrix (https://github.com/Netflix/Hystrix) event stream with jetty for clojure.
https://github.com/killme2008/ring-jetty-hystrix-adapter
Last synced: about 1 month ago
JSON representation
Setup a Hystrix (https://github.com/Netflix/Hystrix) event stream with jetty for clojure.
- Host: GitHub
- URL: https://github.com/killme2008/ring-jetty-hystrix-adapter
- Owner: killme2008
- License: epl-1.0
- Created: 2015-07-17T07:50:52.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2019-02-20T09:25:38.000Z (over 5 years ago)
- Last Synced: 2024-09-16T18:56:20.779Z (about 2 months ago)
- Language: Clojure
- Size: 18.6 KB
- Stars: 1
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ring-jetty-hystrix-adapter
Setup a Hystrix (https://github.com/Netflix/Hystrix) event stream with jetty 9 for clojure.
## Usage
Leiningen
```clj
[ring-jetty-hystrix-adapter "0.2.3"]
```Run a jetty server:
```clj
(require '[ring-jetty-hystrix-adapter.core :as jetty])(jetty/run-jetty-with-hystrix {:port 3000
:max-threads 10
:hystrix-servlet-path "/hystrix.stream"
:join? false})
```Just like [ring-jetty-adpater](https://github.com/ring-clojure/ring/tree/master/ring-jetty-adapter) but has a new option `hystrix-servlet-path` to
export hystrix event stream. Please see [hystrix-event-stream-clj](https://github.com/josephwilk/hystrix-event-stream-clj).And we add some new options:
```
:connector-stats? - Whether to add a jetty connector statistics.
:handler-stats? - Whether to add a jetty request handler statistics.
:accept-queue-size - The size of the pending connection backlog.
``````clj
(jetty/run-jetty-with-hystrix {:port 3000
:max-threads 10
:hystrix-servlet-path "/hystrix.stream"
:connector-stats? true
:handler-stats? true
:join? false})
```## License
Copyright © 2015 killme2008
Distributed under the Eclipse Public License either version 1.0 or (at
your option) any later version.