# `Ollixir.Retry`
[🔗](https://github.com/nshkrdotcom/ollixir/blob/main/lib/ollixir/retry.ex#L1)

Retry utilities for transient errors.

# `opts`
[🔗](https://github.com/nshkrdotcom/ollixir/blob/main/lib/ollixir/retry.ex#L12)

```elixir
@type opts() :: [
  max_attempts: pos_integer(),
  base_delay: pos_integer(),
  max_delay: pos_integer(),
  retry_on: (term() -&gt; boolean())
]
```

# `with_backoff`
[🔗](https://github.com/nshkrdotcom/ollixir/blob/main/lib/ollixir/retry.ex#L31)

```elixir
@spec with_backoff((-&gt; {:ok, term()} | {:error, term()}), opts()) ::
  {:ok, term()} | {:error, term()}
```

Execute function with exponential backoff retry.

## Options

  * `:max_attempts` - Maximum retry attempts (default: 3)
  * `:base_delay` - Initial delay in ms (default: 1000)
  * `:max_delay` - Maximum delay in ms (default: 30000)
  * `:retry_on` - Function to determine if error is retryable

---

*Consult [api-reference.md](api-reference.md) for complete listing*
