Functions to create and execute retrys.
Functions to create and execute retrys.
(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.
(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.
The global retry and config registry.
The global retry and config registry.
(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.
(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.
(execute retry f & args)Apply args to f within the retry context.
Apply args to f within the retry context.
(exponential-backoff initial-interval-millis)(exponential-backoff initial-interval-millis multiplier)Creates an exponential backoff interval function.
Creates an exponential backoff interval function.
(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.
(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.
(interval interval-millis)Creates an interval function.
Creates an interval function.
(randomized interval-millis)(randomized interval-millis randomization-factor)Creates a randomized interval function.
Creates a randomized interval function.
(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.
The event types that can be raised by a registry.
The event types that can be raised by a registry.
(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.
(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.
(retry name)(retry name config)Creates a retry with the name and config.
Creates a retry with the `name` and `config`.
(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.
(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.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |