Liking cljdoc? Tell your friends :D

resilience4clj.retry

Functions to create and execute retrys.

Functions to create and execute retrys.
raw docstring

add-configuration!clj

(add-configuration! name config)
(add-configuration! registry name config)

Adds config to the registry under the name.

Uses default-registry if registry is not provided.

Adds `config` to the `registry` under the `name`.

Uses [[default-registry]] if `registry` is not provided.
sourceraw docstring

all-retriesclj

(all-retries)
(all-retries registry)

Gets all the retries in registry.

Uses default-registry if registry is not provided.

Gets all the retries in `registry`.

Uses [[default-registry]] if `registry` is not provided.
sourceraw docstring

default-registryclj

The global retry and config registry.

The global retry and config registry.
sourceraw docstring

emit-events!clj

(emit-events! retry out-chan & {:keys [only exclude] :or {exclude []}})

Offers events on retry to out-chan.

The event types are identified by event-types.

This function also accepts :only and :exclude keyword params that are sequences of the event types that should be included or excluded, respectively.

Offers events on `retry` to `out-chan`.

The event types are identified by [[event-types]].

This function also accepts `:only` and `:exclude` keyword params that are
sequences of the event types that should be included or excluded,
respectively.
sourceraw docstring

emit-registry-events!clj

(emit-registry-events! out-chan)
(emit-registry-events! registry
                       out-chan
                       &
                       {:keys [only exclude] :or {exclude []}})

Offers registry events to out-chan.

The event types are identified by registry-event-types.

This function also accepts :only and :exclude keyword params that are sequences of the event types that should be included or excluded, respectively.

Uses default-registry if registry is not provided.

Offers registry events to `out-chan`.

The event types are identified by [[registry-event-types]].

This function also accepts `:only` and `:exclude` keyword params that are
sequences of the event types that should be included or excluded,
respectively.

Uses [[default-registry]] if `registry` is not provided.
sourceraw docstring

event-typesclj

source

executeclj

(execute retry f & args)

Apply args to f within the retry context.

Apply args to f within the retry context.
sourceraw docstring

exponential-backoffclj

(exponential-backoff initial-interval-millis)
(exponential-backoff initial-interval-millis multiplier)

Creates an exponential backoff interval function.

Creates an exponential backoff interval function.
sourceraw docstring

exponential-random-backoffclj

(exponential-random-backoff initial-interval-millis)
(exponential-random-backoff initial-interval-millis multiplier)
(exponential-random-backoff initial-interval-millis
                            multiplier
                            randomization-factor)

Creates an exponential random backoff interval function.

Creates an exponential random backoff interval function.
sourceraw docstring

findclj

(find name)
(find registry name)

Finds the retry identified by name in registry.

Uses default-registry if registry is not provided.

Finds the retry identified by `name` in `registry`.

Uses [[default-registry]] if `registry` is not provided.
sourceraw docstring

intervalclj

(interval interval-millis)

Creates an interval function.

Creates an interval function.
sourceraw docstring

nameclj

(name retry)

Gets the name of retry.

Gets the name of `retry`.
sourceraw docstring

randomizedclj

(randomized interval-millis)
(randomized interval-millis randomization-factor)

Creates a randomized interval function.

Creates a randomized interval function.
sourceraw docstring

registryclj

(registry)
(registry configs-map)

Creates a registry with default values or a map of nam/config-map pairs.

Creates a registry with default values or a map of nam/config-map pairs.
sourceraw docstring

registry-event-typesclj

The event types that can be raised by a registry.

The event types that can be raised by a registry.
sourceraw docstring

remove!clj

(remove! name)
(remove! registry name)

Removes the retry identified by name from registry.

Uses default-registry if registry is not provided.

Removes the retry identified by `name` from `registry`.

Uses [[default-registry]] if `registry` is not provided.
sourceraw docstring

replace!clj

(replace! name retry)
(replace! registry name retry)

Replaces the retry identified by name in registry with the specified retry.

Uses default-registry if registry is not provided.

Replaces the retry identified by `name` in `registry` with the specified `retry`.

Uses [[default-registry]] if `registry` is not provided.
sourceraw docstring

retryclj

(retry name)
(retry name config)

Creates a retry with the name and config.

Creates a retry with the `name` and `config`.
sourceraw docstring

retry!clj

(retry! name)
(retry! registry name)
(retry! registry name config)

Creates or fetches a retry with the specified name and config and stores it in registry.

The config value can be either a config map or the name of a config map stored in the registry. If the retry already exists in the registry, the config value is ignored.

Uses default-registry if registry is not provided.

Creates or fetches a retry with the specified name and config and stores it
in `registry`.

The config value can be either a config map or the name of a config map stored
in the registry. If the retry already exists in the registry, the config value
is ignored. 

Uses [[default-registry]] if `registry` is not provided.
sourceraw docstring

with-retrycljmacro

(with-retry retry & body)

Executes body within the retry context.

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

Executes body within the retry context.

`retry` is either a retry or the name of one in the global registry. If you
provide a name and a retry 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