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

Supervised process for a central Incant service registry.

The server owns the runtime copy of `%Incant.Service.Registry{}` for a central
Incant admin application. By default it loads from `HOSTKIT_RPC_BINDINGS`
through `Incant.Service.Registry.load/1`, but tests and embedding apps may pass
already decoded `:bindings` or a `:path`.

# `server`

```elixir
@type server() :: GenServer.server()
```

# `child_spec`

Returns a specification to start this module under a supervisor.

See `Supervisor`.

# `get_entry`

```elixir
@spec get_entry(server(), Incant.Service.Entry.binding_key()) ::
  Incant.Service.Entry.t() | nil
```

Fetches the first entry for a binding key.

# `get_entry`

```elixir
@spec get_entry(server(), Incant.Service.Entry.binding_key(), module()) ::
  Incant.Service.Entry.t() | nil
```

Fetches the entry for a binding key and Incant service module.

# `list_entries`

```elixir
@spec list_entries(server()) :: [Incant.Service.Entry.t()]
```

Lists discovered entries.

# `refresh`

```elixir
@spec refresh(server()) :: {:ok, Incant.Service.Registry.t()} | {:error, term()}
```

Reloads bindings/descriptors/contracts and returns the new registry.

# `refresh_entries`

```elixir
@spec refresh_entries(server()) :: [Incant.Service.Entry.t()]
```

Refreshes the registry and lists its entries, retaining the current snapshot on failure.

# `registry`

```elixir
@spec registry(server()) :: Incant.Service.Registry.t()
```

Returns the current registry snapshot.

# `start_link`

```elixir
@spec start_link(keyword()) :: GenServer.on_start()
```

Starts a registry server.

---

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