(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)`
(call! this proc)
(shutdown! this)
(tripped? this)
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close