When and how long to wait before retrying. The defaults match TypeSafe's official SDKs:
:max_retries(2) - retries after the first attempt;0disables retrying:backoff_initial(500) and:backoff_max(5_000) - milliseconds; the delay doubles each attempt up to the maximum:jitter(0.25) - fraction of each delay randomly taken off, between 0 and 1:statuses- HTTP statuses that are retried: 408, 429 and every 5xx, which includes TypeSafe's 529 (overloaded):respect_retry_after(true) - wait as long asretry-after-msorretry-aftersays:retry_connection_errors(true) - retry timeouts and failed connections:budget(30_000) - total milliseconds per call, including waits; a retry whose wait would pass it is not attempted.nilfor no limit.
Pass retry: [max_retries: 5] to TypeSafe.new/1 or to a single call, or retry: false.
Summary
Types
@type t() :: %TypeSafe.Retry{ backoff_initial: non_neg_integer(), backoff_max: non_neg_integer(), budget: pos_integer() | nil, jitter: float(), max_retries: non_neg_integer(), respect_retry_after: boolean(), retry_connection_errors: boolean(), statuses: [pos_integer()] }