# `Wardrik.Operations.Channels`

Passes chat apps' requests to Wardrik's channels.

# `deliver`

```elixir
@spec deliver(Wardrik.Scope.t(), map()) :: {:ok, map()} | {:error, Wardrik.Error.t()}
```

Passes a chat app's request to the channel it names. Returns the channel's response.

# `fetch`

```elixir
@spec fetch(atom(), String.t()) :: {:ok, {module(), keyword()}} | :error
```

Returns the channel `name` as `{module, opts}`, or `:error` if there's none.

`opts` are what the channel's callbacks take. See `options/3`.

# `options`

```elixir
@spec options(Wardrik.t(), String.t(), keyword()) :: keyword()
```

Returns the options a channel's callbacks take.

They're the channel's own options, with each `{:secret, name}` replaced by the deployment's
secret, plus:

  * `:server` - `Wardrik`, which runs its operations.
  * `:wardrik` - the instance's name.
  * `:events` - the event log.
  * `:vault` - the vault, or `nil` without `:keys`.
  * `:channel` - the channel's name.
  * `:store` - the store.

---

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