Liking cljdoc? Tell your friends :D

resilience4clj.circuit-breaker

Functions to create and execute circuit breakers.

Functions to create and execute circuit breakers.
raw docstring

circuit-breakerclj

(circuit-breaker name config)

Creates a circuit breaker with the specified name and config.

Creates a circuit breaker with the specified name and config.
sourceraw docstring

circuit-breaker!clj

(circuit-breaker! name)
(circuit-breaker! name config)

Creates or fetches a circuit breaker with the specified name and config and stores it in the global registry.

The config value can be either a config map or the name of a config map stored in the global registry.

If the circuit breaker already exists in the global registry, the config value is ignored.

Creates or fetches a circuit breaker with the specified name and config and 
stores it in the global registry.

The config value can be either a config map or the name of a config map stored
in the global registry.

If the circuit breaker already exists in the global registry, the config value
is ignored.
sourceraw docstring

close!clj

(close! circuit-breaker)

Transitions the circuit breaker to the :closed state.

Transitions the circuit breaker to the `:closed` state.
sourceraw docstring

configure-registry!clj

(configure-registry! configs-map)

Overwrites the global registry with one that contains the configs-map.

configs-map is a map whose keys are names and vals are configs. When a circuit breaker is created, you may specify one of the names in this map to use as the config for that circuit breaker.

:default is a special name. It will be used as the config for circuit breakers that do not specify a config to use.

Overwrites the global registry with one that contains the configs-map.

configs-map is a map whose keys are names and vals are configs. When a circuit
breaker is created, you may specify one of the names in this map to use as the
config for that circuit breaker.

:default is a special name. It will be used as the config for circuit breakers
that do not specify a config to use.
sourceraw docstring

disable!clj

(disable! circuit-breaker)

Transitions the circuit breaker to the :disabled state.

In the :disabled state, the circuit breaker will not automatically transition to other states, collect metrics, or send events. All calls will be allowed to pass.

You must manually transition out of the :disabled state.

Transitions the circuit breaker to the `:disabled` state.

In the `:disabled` state, the circuit breaker will not automatically
transition to other states, collect metrics, or send events. All calls will be
allowed to pass.

You must manually transition out of the `:disabled` state.
sourceraw docstring

executeclj

(execute circuit-breaker f & args)

Apply args to f within a context protected by the circuit breaker.

Apply args to f within a context protected by the circuit breaker.
sourceraw docstring

force-open!clj

(force-open! circuit-breaker)

Transitions the circuit breaker to the :forced-open state.

In the :forced-open state, the circuit breaker will not automatically transition to other states, collect metrics, or send events. No call will be allowed to pass.

You must manually transition out of the :forced-open state.

Transitions the circuit breaker to the `:forced-open` state.

In the `:forced-open` state, the circuit breaker will not automatically
transition to other states, collect metrics, or send events. No call will be
allowed to pass.

You must manually transition out of the `:forced-open` state.
sourceraw docstring

half-open!clj

(half-open! circuit-breaker)

Transitions the circuit breaker to the :half-open state.

Transitions the circuit breaker to the `:half-open` state.
sourceraw docstring

nameclj

(name circuit-breaker)

Gets the name of the circuit breaker.

Gets the name of the circuit breaker.
sourceraw docstring

open!clj

(open! circuit-breaker)

Transitions the circuit breaker to the :open state.

Transitions the circuit breaker to the `:open` state.
sourceraw docstring

registryclj

The global circuit breaker and config registry.

The global circuit breaker and config registry.
sourceraw docstring

reset!clj

(reset! circuit-breaker)
source

stateclj

(state circuit-breaker)

Gets the current state of the circuit breaker.

Gets the current state of the circuit breaker.
sourceraw docstring

with-circuit-breakercljmacro

(with-circuit-breaker circuit-breaker & body)

Executes body within a context protected by the circuit breaker.

circuit-breaker is either a circuit breaker or the name of one in the global registry. If you provide a name and a circuit breaker of that name does not already exist in the global registry, one will be created with the :default config.

Executes body within a context protected by the circuit breaker.

`circuit-breaker` is either a circuit breaker or the name of one in the global
registry. If you provide a name and a circuit breaker of that name does not 
already exist in the global registry, one will be created with the `:default` 
config.
sourceraw docstring

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

× close