# `Incant.Service.Registry`
[🔗](https://github.com/elixir-vibe/incant/blob/v0.1.1/lib/incant/service/registry.ex#L1)

Runtime registry for remotely discovered Incant services.

The registry is the central-admin side of the HostKit/SafeRPC/Incant flow:

  * HostKit provides an ETF binding term path in `HOSTKIT_RPC_BINDINGS`.
  * Incant decodes the local HostKit-generated term from a trusted file.
  * SafeRPC descriptors identify modules exposing the Incant service shape.
  * Incant calls `describe` for each service and stores the resulting contract.

No service-specific modules are hardcoded by the central Incant admin.

# `t`

```elixir
@type t() :: %Incant.Service.Registry{
  bindings: SafeRPC.local_bindings() | [SafeRPC.local_binding()],
  entries: [Incant.Service.Entry.t()],
  source: {:env, String.t(), Path.t()} | {:file, Path.t()} | :bindings
}
```

# `decode_bindings`

```elixir
@spec decode_bindings(binary()) :: {:ok, SafeRPC.local_bindings()} | {:error, term()}
```

Decodes a trusted local HostKit/SafeRPC binding ETF term.

# `from_bindings`

```elixir
@spec from_bindings(
  SafeRPC.local_bindings() | [SafeRPC.local_binding()],
  keyword()
) :: {:ok, t()} | {:error, term()}
```

Builds a registry from an already decoded HostKit/SafeRPC binding term.

# `load`

```elixir
@spec load(keyword()) :: {:ok, t()} | {:error, term()}
```

Loads a registry from the `HOSTKIT_RPC_BINDINGS` environment variable.

# `load_file`

```elixir
@spec load_file(
  Path.t(),
  keyword()
) :: {:ok, t()} | {:error, term()}
```

Loads a registry from a HostKit/SafeRPC binding ETF file.

---

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