ides_family (ides v0.2.0)
View SourceType definitions and tree-walking primitives for ides.
Summary
Types
A worker (leaf) process. Includes its restart_type as defined
in the parent supervisor's child spec.
Restart type of a child process.
Tagged source of a kill: which process and by what mechanism.
Link relationship info for a process.
Monitor relationship info for a process.
A process in the supervision tree: a supervisor or a worker.
A supervisor process. Contains its strategy and ordered list
of children. When this supervisor is also a child of another
supervisor, restart_type is present.
Restart strategy of a supervisor.
Functions
Walk the supervision tree from the topmost ancestor down to
TargetPid. Returns the tree including the ancestor chain and
all siblings at each level.
Types
-type child_process() :: #{name := string(), pid := pid(), type := worker, restart_type := child_restart_type()}.
A worker (leaf) process. Includes its restart_type as defined
in the parent supervisor's child spec.
-type child_restart_type() :: permanent | transient | temporary.
Restart type of a child process.
Tagged source of a kill: which process and by what mechanism.
Link relationship info for a process.
Monitor relationship info for a process.
-type parent_info() :: #{sup_pid := pid(), sup_strategy := supervisor_strategy(), child_pids := [{term(), pid()}], target_position => pos_integer()}.
-type process() :: supervisor_process() | child_process().
A process in the supervision tree: a supervisor or a worker.
-type supervisor_process() :: #{name := string(), pid := pid(), type := supervisor, strategy := supervisor_strategy(), restart_type => child_restart_type(), children := [process()]}.
A supervisor process. Contains its strategy and ordered list
of children. When this supervisor is also a child of another
supervisor, restart_type is present.
-type supervisor_strategy() :: one_for_one | one_for_all | rest_for_one | simple_one_for_one.
Restart strategy of a supervisor.
Functions
Walk the supervision tree from the topmost ancestor down to
TargetPid. Returns the tree including the ancestor chain and
all siblings at each level.
-spec get_restart_type(SupPid :: pid(), Id :: term()) -> child_restart_type().
-spec parent_info(Pid :: pid()) -> {ok, parent_info()} | {error, term()}.