# `ExGAM.Adapter`
[🔗](https://github.com/elchemista/ex_gam/blob/0.1.0/lib/ex_gam/adapter.ex#L1)

Small, authority-free utilities shared by ExGAM adapter boundaries.

Adapters connect the governed runtime to application code: clocks, ingress,
minds, stores, executors, brokers and observers. Discovering a module or
calling one of its callbacks never grants authority; it only validates host
wiring or crosses an already-declared boundary.

This module intentionally knows nothing about a particular behaviour. Each
boundary remains responsible for validating callback results and translating
failures into its own domain vocabulary.

# `callback_spec`

```elixir
@type callback_spec() :: {atom(), non_neg_integer()}
```

# `invocation_error`

```elixir
@type invocation_error() ::
  {:adapter_callback_exception, module(), atom(), module()}
  | {:adapter_callback_failure, module(), atom(), :exit | :throw}
```

# `validation_error`

```elixir
@type validation_error() ::
  {:invalid_adapter_module, term()}
  | {:adapter_module_not_loaded, module()}
  | {:adapter_callback_missing, module(), atom(), non_neg_integer()}
```

# `invoke`

```elixir
@spec invoke(module(), atom(), [term()]) ::
  {:ok, term()} | {:error, invocation_error()}
```

Invokes a previously validated callback without leaking exception details.

# `validate`

```elixir
@spec validate(term(), [callback_spec()]) :: :ok | {:error, validation_error()}
```

Validates that a loaded module implements every required callback.

---

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