Functions to create and execute retrys.
Functions to create and execute retrys.
(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 retry is created, you may specify one of the names in this map to use as the config for that retry.
:default is a special name. It will be used as the config for retrys 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 retry is created, you may specify one of the names in this map to use as the config for that retry. :default is a special name. It will be used as the config for retrys that do not specify a config to use.
(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.
(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.
The global retry and config registry.
The global retry and config registry.
(retry name config)
Creates a retry with the specified name and config.
Creates a retry with the specified name and config.
(retry! name)
(retry! name config)
Creates or fetches a retry 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 retry already exists in the global registry, the config value is ignored.
Creates or fetches a retry 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 retry already exists in the global registry, the config value is ignored.
(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 is a website building & hosting documentation for Clojure/Script libraries
× close