# `Gust.Run.Claim`

Behavior + facade for claiming/renewing run leases.

Configure the implementation with:

    config :gust, Gust.Run.Claim, Gust.Run.Claim.Repo

# `next_run_result`

```elixir
@type next_run_result() ::
  nil
  | %{
      run: run(),
      token: token(),
      claimed_by: String.t(),
      claim_expires_at: DateTime.t()
    }
```

# `run`

```elixir
@type run() :: Gust.Flows.Run.t()
```

# `run_id`

```elixir
@type run_id() :: term()
```

# `token`

```elixir
@type token() :: Ecto.UUID.t()
```

# `next_run`

```elixir
@callback next_run() :: next_run_result()
```

# `renew_run`

```elixir
@callback renew_run(run_id(), token()) :: run() | nil
```

# `next_run`

# `renew_run`

---

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