Incant. Service. RegistryServer
(incant v0.1.0)
Copy Markdown
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.
Summary
Functions
Returns a specification to start this module under a supervisor.
Fetches the first entry for a binding key.
Fetches the entry for a binding key and Incant service module.
Lists discovered entries.
Reloads bindings/descriptors/contracts and returns the new registry.
Refreshes the registry and lists its entries, retaining the current snapshot on failure.
Returns the current registry snapshot.
Starts a registry server.
Types
@type server() :: GenServer.server()
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
@spec get_entry(server(), Incant.Service.Entry.binding_key()) :: Incant.Service.Entry.t() | nil
Fetches the first entry for a binding key.
@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.
@spec list_entries(server()) :: [Incant.Service.Entry.t()]
Lists discovered entries.
@spec refresh(server()) :: {:ok, Incant.Service.Registry.t()} | {:error, term()}
Reloads bindings/descriptors/contracts and returns the new registry.
@spec refresh_entries(server()) :: [Incant.Service.Entry.t()]
Refreshes the registry and lists its entries, retaining the current snapshot on failure.
@spec registry(server()) :: Incant.Service.Registry.t()
Returns the current registry snapshot.
@spec start_link(keyword()) :: GenServer.on_start()
Starts a registry server.