Liking cljdoc? Tell your friends :D
Clojure only.

clj-circuit-breaker.protocol


CircuitBreakercljprotocol

The Circuit breaker protocol (if (breaker/tripped? circuit-breaker circuit-name) (do-fake-action) (try (do-action) (breaker/record-success! circuit-breaker circuit-name) (catch Exception e (breaker/record-failure! circuit-breaker circuit-name))))

The Circuit breaker protocol
(if (breaker/tripped? circuit-breaker circuit-name)
      (do-fake-action)
       (try
          (do-action)
          (breaker/record-success! circuit-breaker circuit-name)
           (catch Exception e (breaker/record-failure! circuit-breaker circuit-name))))

record-failure!clj

(record-failure! this circuit-name)

should be invoked when the monitored operation fails, it will increment the failure counters and trigger a circuit break if the treashold is hit

should be invoked when the monitored operation fails, it will increment the failure counters and trigger a circuit break if
the treashold is hit

record-success!clj

(record-success! this circuit-name)

should be invoked when the monitored operation succeed, it will delete all failure counters for the given circuit

should be invoked when the monitored operation succeed, it will delete all failure counters for the given circuit

reset-all-circuit-counters!clj

(reset-all-circuit-counters! this)

reset-all-circuits!clj

(reset-all-circuits! this)

tripped?clj

(tripped? this circuit-name)

should be tested before invoking the monitored operation, incase the circuit breaker is tripped the operation should be skipped the success or failure of the monitored operation should feedback the circuit breaker mechanism so it is up to date

should be tested before invoking the monitored operation, incase the circuit breaker is tripped the operation should be skipped
the success or failure of the monitored operation should feedback the circuit breaker mechanism so it is up to date
raw docstring

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

× close