Skip to content
This repository was archived by the owner on Aug 24, 2022. It is now read-only.
/ pumila Public archive

Lighter Clojure replacement for Netflix hystrix latency and fault tolerance library

License

Notifications You must be signed in to change notification settings

ngrunwald/pumila

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pumila

Lighter Clojure replacement for Netflix hystrix latency and fault tolerance library

Usage

(defn get-my-uri
  [uri]
  (:body (http/get uri)))

(def commander (pm/make-commander {:label "http-client" :max-size 5}))

(let [;; async
      f (pm/queue commander {:timeout 1000 :error-fn println :fallback-fn (constantly "I feel lucky!")} (get-my-uri "http://google.com"))
      result1 @f

      ;; sync
      result2 (pm/exec commander {:timeout 1000 :error-fn println :fallback-fn (constantly "I feel lucky!")} (get-my-uri "http://google.com"))])

License

Copyright © 2016 Oscaro.com

Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.

About

Lighter Clojure replacement for Netflix hystrix latency and fault tolerance library

Resources

License

Stars

Watchers

Forks

Packages

No packages published