Liking cljdoc? Tell your friends :D

tank.circuit-breaker


circuit-breakerclj

(circuit-breaker trip-threshold
                 recovery-ms
                 &
                 {:keys [failed?] :or {failed? (constantly false)}})

Creates a circuit breaker. Params:

trip-threshold: number denoting amount of fails before the circuit breaker is tripped

recovery-ms: time, in milliseconds, for resetting one error count.

failed?: optional function that will run on the result of proc. If it evaluates to true, the result counts as a failure and will consume from the bucked. Defaults to (constantly false)

Creates a circuit breaker.
Params:

`trip-threshold`: number denoting amount of fails before the circuit
breaker is tripped

`recovery-ms`: time, in milliseconds, for resetting one error count.

`failed?`: optional function that will run on the result of `proc`. If it
  evaluates to `true`, the result counts as a failure and will consume
  from the bucked. Defaults to `(constantly false)`
sourceraw docstring

ICircuitBreakercljprotocol

call!clj

(call! this proc)

shutdown!clj

(shutdown! this)

tripped?clj

(tripped? this)
source

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close