def settle.outcome
bend-kit-hairpin@0.13.0.1 · hairpin.bend:272
import bend-kit-hairpin@0.13.0.1/hairpin.bend as Hairpin
import Base
import bend-kit-http@0.38.1.1/http.bend as Http
import bend-kit-bytes@0.3.3.0/bytes.bend as Bytes
import bend-kit-retry@0.2.0.0/retry.bend as Retry
272
273def settle.outcome(-R: Type, +p: Retry.Policy, +n: Nat, hit: Bool, +o: Retry.Outcome, +br: Retry.Breaker, b: Retry.Budget, body: Bytes.Bytes,
274 pool: Http.Pool, jar: Maybe<&2, Http.Jar>, r: Result<&1, &1, Http.Err, R>) -> IO(Step<R>):
275 do IO<Step<R>>:
276 now : Nat <- clock(Bool.or(breaker.on(br), transient(o)))
277 rnd : Nat <- jitter.io(transient(o))
278 return settle.at(R, now, rnd, p, n, hit, o, br, b, body, pool, jar, r)