Commanded v0.15.0 Commanded.Registration.LocalRegistry behaviour View Source
Local process registration, restricted to a single node, using Elixir’s Registry.
Link to this section Summary
Functions
Return an optional supervisor spec for the registry
Starts a uniquely named child process of a supervisor using the given module and args
Starts a uniquely named GenServer
process for the given module and args
Return a :via
tuple to route a message to a process by its registered name
Get the pid of a registered name
Callbacks
Sends a message to the given dest and returns :ok
Link to this section Functions
Return an optional supervisor spec for the registry
start_child(name :: term(), supervisor :: module(), args :: [any()]) :: {:ok, pid()} | {:error, reason :: term()}
Starts a uniquely named child process of a supervisor using the given module and args.
Registers the pid with the given name.
start_link(name :: term(), module :: module(), args :: any()) :: {:ok, pid()} | {:error, reason :: term()}
Starts a uniquely named GenServer
process for the given module and args.
Registers the pid with the given name.
via_tuple(name :: term()) :: {:via, module(), name :: term()}
Return a :via
tuple to route a message to a process by its registered name
whereis_name(name :: term()) :: pid() | :undefined
Get the pid of a registered name.
Returns :undefined
if the name is unregistered.
Link to this section Callbacks
multi_send(dest :: atom(), message :: any()) :: :ok
Sends a message to the given dest and returns :ok
.