Coffrify.Runtime.Retry.ExponentialBackoff (Coffrify v0.9.0)

View Source

Exponential backoff with jitter: base * 2^attempt, capped at max_delay_ms. Honors a server-supplied Retry-After when present.

Summary

Functions

Build a policy. Options override defaults.

Types

t()

@type t() :: %Coffrify.Runtime.Retry.ExponentialBackoff{
  base_delay_ms: pos_integer(),
  jitter_factor: float(),
  max_attempts: non_neg_integer(),
  max_delay_ms: pos_integer()
}

Functions

new(opts \\ [])

@spec new(keyword()) :: t()

Build a policy. Options override defaults.