# `AttestoClient.RefreshCoordinator`
[🔗](https://github.com/XukuLLC/attesto_client/blob/v2.26.0/lib/attesto_client/refresh_coordinator.ex#L1)

Single-flight coordinator for refresh-token rotation.

Concurrent refreshes for the same application-supplied key share exactly one
operation and receive the same result. Different keys run independently. A
deadline kills a stuck operation, wakes every waiter, and clears the key for
a later attempt.

The key should identify the application's token record without containing a
token secret. This process does not store token sets after an operation;
callers must atomically persist successful rotation results according to
their own retention policy.

# `option`

```elixir
@type option() :: GenServer.option()
```

# `child_spec`

Returns a specification to start this module under a supervisor.

See `Supervisor`.

# `run`

```elixir
@spec run(GenServer.server(), term(), (-&gt; term()), pos_integer()) :: term()
```

Run `fun` once for `key`, sharing its result with concurrent callers.

# `start_link`

```elixir
@spec start_link([option()]) :: GenServer.on_start()
```

---

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