Liking cljdoc? Tell your friends :D

salt.retry

Retry was copied and modified version of retry.clj from https://github.com/cognitect-labs/aws-api. This software is licensed under same license and original Copyright statements included in this file.

Retry was copied and modified version of retry.clj from https://github.com/cognitect-labs/aws-api. This software is licensed under same license and original Copyright statements included in this file.
raw docstring

capped-exponential-backoffclj

(capped-exponential-backoff base max-backoff max-retries)

Returns a function of the num-retries (so far), which returns the lesser of max-backoff and an exponentially increasing multiple of base, or nil when (>= num-retries max-retries). See with-retry to see how it is used. Alpha. Subject to change.

Returns a function of the num-retries (so far), which returns the
lesser of max-backoff and an exponentially increasing multiple of
base, or nil when (>= num-retries max-retries).
See with-retry to see how it is used.
Alpha. Subject to change.
sourceraw docstring

default-backoffclj

Returns (capped-exponential-backoff 100 20000 3). Alpha. Subject to change.

Returns (capped-exponential-backoff 100 20000 3).
Alpha. Subject to change.
sourceraw docstring

default-retriable?clj

(default-retriable? response)

Returns true if response is categorized as retriable or is exception with ex-data which is categorized as retriable.

Returns true if response is categorized as retriable or is exception with ex-data
which is categorized as retriable.
sourceraw docstring

with-retryclj

(with-retry req-fn resp-chan)
(with-retry req-fn resp-chan retriable? backoff)

For internal use. Do not call directly. Calls req-fn, a non-blocking function that wraps some operation and returns a channel. When the response to req-fn is retriable? and backoff returns an int, waits backoff ms and retries, otherwise puts response on resp-chan. Resp-chan is closed when src-chan is closed.

For internal use. Do not call directly.
Calls req-fn, a *non-blocking* function that wraps some operation
and returns a channel. When the response to req-fn is retriable?
and backoff returns an int, waits backoff ms and retries, otherwise
puts response on resp-chan.
Resp-chan is closed when src-chan is closed.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close