Skip to content

lbt05/ring-jetty-hystrix-adapter

 
 

Repository files navigation

ring-jetty-hystrix-adapter

Setup a Hystrix (https://github.com/Netflix/Hystrix) event stream with jetty 9 for clojure.

Usage

Leiningen

[ring-jetty-hystrix-adapter "0.2.0-RC1"]

Run a jetty server:

(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 but has a new option hystrix-servlet-path to export hystrix event stream. Also see hystrix-event-stream-clj.

Also, we add two new options connector-stats? and handler-stats? to choose whether to enable jetty jetty statistics handler:

(jetty/run-jetty-with-hystrix app
                              {: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.

About

Setup a Hystrix (https://github.com/Netflix/Hystrix) event stream with jetty for clojure.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Clojure 100.0%