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-retry-after value now)Parse a Retry-After delay-seconds or RFC 1123 HTTP-date value. Returns a nonnegative delay in milliseconds, or nil if unparseable. The two-argument arity accepts the current Instant for deterministic use.
Parse a Retry-After delay-seconds or RFC 1123 HTTP-date value. Returns a nonnegative delay in milliseconds, or nil if unparseable. The two-argument arity accepts the current Instant for deterministic use.
(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 |