View Source ProcessHub.Service.ProcessRegistry (ProcessHub v0.2.0-alpha)
The process registry service provides API functions for managing the process registry.
Summary
Functions
Deletes information about multiple child processes from the registry.
Inserts information about multiple child processes into the registry.
Deletes all objects from the process registry.
Returns a list of child_ids that match the given child_ids
variable.
Deletes information about a child process from the registry.
Inserts information about a child process into the registry.
Returns a list of child specs registered under the local node.
Returns information about processes registered under the local node.
Return the child_spec, nodes, and pids for the given child_id.
Returns information about all registered processes.
Types
@type registry() :: %{ required(ProcessHub.child_id()) => {ProcessHub.child_spec(), [{node(), pid()}]} }
Functions
@spec bulk_delete(ProcessHub.hub_id(), %{ required(ProcessHub.child_id()) => {ProcessHub.child_spec(), [{node(), pid()}]} }) :: :ok
Deletes information about multiple child processes from the registry.
Calling this function will dispatch the :registry_pid_remove_hook
hooks unless
the :skip_hooks
option is set to true
.
@spec bulk_insert(ProcessHub.hub_id(), %{ required(ProcessHub.child_id()) => {ProcessHub.child_spec(), [{node(), pid()}]} }) :: :ok
Inserts information about multiple child processes into the registry.
Calling this function will dispatch the :registry_pid_insert_hook
hook unless the :skip_hooks
option is set to true
.
@spec clear_all(ProcessHub.hub_id()) :: integer()
Deletes all objects from the process registry.
@spec contains_children(ProcessHub.hub_id(), [ProcessHub.child_id()]) :: [ ProcessHub.child_id() ]
Returns a list of child_ids that match the given child_ids
variable.
@spec delete(ProcessHub.hub_id(), ProcessHub.child_id(), keyword() | nil) :: :ok
Deletes information about a child process from the registry.
Calling this function will dispatch the :registry_pid_remove_hook
hook unless the :skip_hooks
option is set to true
.
@spec insert( ProcessHub.hub_id(), ProcessHub.child_spec(), [{node(), pid()}], keyword() | nil ) :: :ok
Inserts information about a child process into the registry.
Calling this function will dispatch the :registry_pid_insert_hook
hook unless the :skip_hooks
option is set to true
.
@spec local_child_specs(ProcessHub.hub_id()) :: [ProcessHub.child_spec()]
Returns a list of child specs registered under the local node.
@spec local_children(ProcessHub.hub_id()) :: [ {ProcessHub.child_id(), {ProcessHub.child_spec(), [{node(), pid()}]}} ]
Returns information about processes registered under the local node.
@spec lookup(ProcessHub.hub_id(), ProcessHub.child_id(), [{:table, atom()}] | nil) :: nil | {ProcessHub.child_spec(), [{node(), pid()}]}
Return the child_spec, nodes, and pids for the given child_id.
@spec process_list(atom(), :global | :local) :: [ {ProcessHub.child_id(), [{node(), pid()}] | [pid()]} ]
@spec registry(ProcessHub.hub_id()) :: registry()
Returns information about all registered processes.