RetryRecord

Constructors for Retry`1.

Fields

NameTypeDescription
RetriesRetriesThe maximum number of retries after the first attempt; 3 allows 4 executions in total.
BackoffBackoffThe delay before each retry.
WhenWhenReturns true for inputs that should be retried; others stop immediately.

Specification

Kind
Record
Members
2
Examples
0
defaultsSignature
Retry.defaults
scheduleSignature
Retry.schedule retry

Summary

NameSignatureSynopsis
Operations
defaultsRetry.defaults Three retries with exponential backoff from 100 ms, capped at 10 s, retrying every input.
scheduleRetry.schedule retryBuilds the schedule a retry record describes.

Operations

kind:member

defaults

Retry.defaults
Member
Three retries with exponential backoff from 100 ms, capped at 10 s, retrying every input.

Returns

Retry<'input>

Verification Examples

fetch |> Flow.retry (Retry.schedule { Retry.defaults with Retries = 5; When = HttpError.isTransient })
kind:member

schedule

Retry.schedule retry
Member
Builds the schedule a retry record describes.

Parameters

NameTypeDescription
retryRetry<'input>The retry description.

Returns

Schedule<'env, 'input, int>