# `Mead.Session`
[🔗](https://github.com/albertosca/mead/blob/main/lib/mead/session.ex#L1)

Registry helpers shared by the processes that make up one conversation.

Every conversation owns three registered processes, its `:supervisor`, a `:history` keeper,
and a `:server`, all found under `Mead.Registry` by `{role, session_id}`.

# `role`

```elixir
@type role() :: :supervisor | :history | :server
```

# `via`

```elixir
@spec via(String.t(), role()) :: {:via, Registry, {atom(), {role(), String.t()}}}
```

Returns the `:via` name under which a conversation's process registers itself.

# `whereis`

```elixir
@spec whereis(String.t(), role()) :: pid() | nil
```

Returns the pid registered for a conversation's role, or `nil` when there is none.

---

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