Anoma.Node.Registry (Anoma v0.34.0)
I am the Node Registry module.
I provide functionality for creating addresses, registering engines to specific addresses, and querying information regarding the registered addresses and engines.
Public API
Summary
Functions
I create an address with specified node id, engine name and label.
I return the contents of the registry.
Given a node_id, I return a list of all the engine names I know for this node.
Given an engine type, I return the name of the local engine of that type.
I register the calling process under the name of the engine at the given node id.
I generate the :via stanza for a process with the given node_id and engine name.
Given a node id and engine, I check if there is a process registered with that address and return the pid.
Functions
@spec address(String.t(), atom(), atom()) :: Anoma.Node.Registry.Address.t()
I create an address with specified node id, engine name and label.
@spec dump_register() :: [{Anoma.Node.Registry.Address.t(), pid(), any()}]
I return the contents of the registry.
Given a node_id, I return a list of all the engine names I know for this node.
I filter out all the non-engine names based on an allow list.
Given an engine type, I return the name of the local engine of that type.
If there are multiple engines of that type present, I raise an error.
I register the calling process under the name of the engine at the given node id.
@spec via(Anoma.Node.Registry.Address.t()) :: {:via, Registry, {atom(), Anoma.Node.Registry.Address.t()}}
@spec via(String.t(), atom(), atom()) :: {:via, Registry, {atom(), Anoma.Node.Registry.Address.t()}}
I generate the :via stanza for a process with the given node_id and engine name.
Given a node id and engine, I check if there is a process registered with that address and return the pid.