Incant. Service. Registry
(incant v0.1.0)
Copy Markdown
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
describefor each service and stores the resulting contract.
No service-specific modules are hardcoded by the central Incant admin.
Summary
Functions
Decodes a trusted local HostKit/SafeRPC binding ETF term.
Builds a registry from an already decoded HostKit/SafeRPC binding term.
Loads a registry from the HOSTKIT_RPC_BINDINGS environment variable.
Loads a registry from a HostKit/SafeRPC binding ETF file.
Types
@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 }
Functions
@spec decode_bindings(binary()) :: {:ok, SafeRPC.local_bindings()} | {:error, term()}
Decodes a trusted local HostKit/SafeRPC binding ETF term.
@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.
Loads a registry from the HOSTKIT_RPC_BINDINGS environment variable.
Loads a registry from a HostKit/SafeRPC binding ETF file.