Data-driven retry policy with jittered backoff.
Data-driven retry policy with jittered backoff.
(default-policy)Return a default retry policy map.
Return a default retry policy map.
(jittered-backoff attempt
&
{:keys [base-delay-ms max-delay-ms jitter-ratio]
:or
{base-delay-ms 5000 max-delay-ms 120000 jitter-ratio 0.5}})Compute a jittered exponential backoff delay in milliseconds. attempt is 1-based.
Compute a jittered exponential backoff delay in milliseconds. attempt is 1-based.
(parse-retry-after value)Parse a Retry-After header value. Returns delay in milliseconds, or nil if unparseable.
Parse a Retry-After header value. Returns delay in milliseconds, or nil if unparseable.
(should-retry? error policy attempt)Given a classified error and a retry policy, decide whether to retry. Also returns the delay if retrying.
Given a classified error and a retry policy, decide whether to retry. Also returns the delay if retrying.
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 |