Std.Concurrent.Retry
10 public declarations
- ceiling
&Std.Concurrent.Retry.Policy -> Int -> IntThe wait before retry
retry, before jitter. It multiplies only while the - delay
&Std.Concurrent.Retry.Policy -> Int -> &Std.Random.Generator -> (Std.Random.Generator, Int)The jittered wait before retry
retry, and the generator to draw from next. - Jitter
How a wait is spread below its ceiling. Spreading keeps clients that
- Policy
How often to try and how long to wait between tries. The wait before
- RetryError
Why retrying ended without a value.
- run
&Std.Concurrent.Retry.Policy -> fn(Int) -> Result[T, E] -> Result[T, Std.Concurrent.Retry.RetryError[E]]Run
actionuntil it succeeds or the attempts run out, retrying every - runCancellable
&Std.Concurrent.Retry.Policy -> &Std.Concurrent.Cancel.Token -> fn(E) -> Bool -> fn(Int) -> Result[T, E] -> Result[T, Std.Concurrent.Retry.RetryError[E]]runWhen, stopping when the token fires: before each attempt and during - runWhen
&Std.Concurrent.Retry.Policy -> fn(E) -> Bool -> fn(Int) -> Result[T, E] -> Result[T, Std.Concurrent.Retry.RetryError[E]]run, retrying only the failuresretryableaccepts; any other failure - standard
Std.Concurrent.Retry.PolicyFive attempts, waiting from 100 ms and doubling up to 10 s, fully jittered.
- validate
&Std.Concurrent.Retry.Policy -> Result[(), Str]Why a policy cannot be followed, checked before any attempt.
