# `EKV.Transport`

Minimal adapter boundary for EKV data-plane traffic.

EKV uses this boundary for member shard sends and routed client RPC. The
default adapter keeps Erlang distribution behavior; callers may provide a
volatile ordered lane without EKV owning that lane's supervision.

Public transport config is `nil` or `{Module, opts}`. EKV validates `Module`
implements this behaviour and passes `opts` directly to `Module.init/1`;
adapter option keys are adapter-owned and not interpreted by EKV.

`init/1` prepares a lightweight adapter handle from static configuration.
EKV calls it once per replica shard process for member traffic and may call
it on the routed-client-RPC hot path. Adapter implementations must not start
per-call transport workers from `init/1`; long-lived transport processes
should be supervised by the application that owns the transport.

# `config`

```elixir
@type config() :: %{module: module(), opts: keyword()}
```

# `external_config`

```elixir
@type external_config() :: nil | {module(), keyword()}
```

# `handle`

```elixir
@type handle() :: {module(), term()}
```

# `target`

```elixir
@type target() :: pid() | atom() | {atom(), node()}
```

# `init`

```elixir
@callback init(keyword()) :: {:ok, term()} | {:error, term()}
```

# `rpc`

```elixir
@callback rpc(term(), node(), module(), atom(), [term()], keyword()) ::
  {:ok, term()}
  | {:raise, term()}
  | {:throw, term()}
  | {:exit, term()}
  | {:error, term()}
```

# `send`

```elixir
@callback send(term(), target(), term(), keyword()) :: :ok | {:error, term()}
```

---

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