View Source Siblings.Lookup (Siblings v0.8.2)
Lookup module to quick access children and the _FSM_
for the Siblings
instance itself.
This module is a part of Siblings
supervision tree
and should never be started manually. It exposes the interface
Link to this section Summary
Functions
Returns all the workers running under this Siblings
instance as a map
%{Siblings.Worker.id() => pid()}
.
Returns a specification to start this module under a supervisor.
Removes the reference for the naturally terminated child from the workers map
through :delete_child
transition with all the respective callbacks.
Returns the pid
of the single dynamically supervised worker by its id
.
Initiates the :start_child
transition with all the respective callbacks
to add a new child to the supervised list.
Link to this section Types
@type state() :: :terminated | :ready | :idle | :*
Link to this section Functions
@spec all(module()) :: %{required(Siblings.Worker.id()) => pid()}
Returns all the workers running under this Siblings
instance as a map
%{Siblings.Worker.id() => pid()}
.
This map might be really huge when there are many processes managed.
Returns a specification to start this module under a supervisor.
See Supervisor
.
@spec del(module(), Siblings.Worker.id()) :: :ok
Removes the reference for the naturally terminated child from the workers map
through :delete_child
transition with all the respective callbacks.
Returns the pid
of the single dynamically supervised worker by its id
.
@spec put(module(), Siblings.worker()) :: :ok
Initiates the :start_child
transition with all the respective callbacks
to add a new child to the supervised list.