ides_family (ides v0.1.0)

View Source

Summary

Types

child_process()

-type child_process() ::
          #{name := string(), pid := pid(), type := worker, restart_type := child_restart_type()}.

child_restart_type()

-type child_restart_type() :: permanent | transient | temporary.

parent_info()

-type parent_info() ::
          #{sup_pid := pid(),
            sup_strategy := supervisor_strategy(),
            child_pids := [{term(), pid()}],
            target_position => pos_integer()}.

process()

-type process() :: supervisor_process() | child_process().

supervisor_process()

-type supervisor_process() ::
          #{name := string(),
            pid := pid(),
            type := supervisor,
            strategy := supervisor_strategy(),
            restart_type => child_restart_type(),
            children := [process()]}.

supervisor_strategy()

-type supervisor_strategy() :: one_for_one | one_for_all | rest_for_one | simple_one_for_one.

Type definitions and tree-walking primitives for ides.

Functions

ancestors(TargetPid)

-spec ancestors(TargetPid :: pid()) -> {ok, process()} | {error, term()}.

child_pids(Children)

-spec child_pids(Children :: [term()]) -> [{term(), pid()}].

child_position(Pid, Children)

-spec child_position(Pid :: pid(), Children :: [{term(), pid()}]) -> pos_integer().

get_ancestors(Pid)

-spec get_ancestors(Pid :: pid()) -> {ok, [term()]} | {error, term()}.

get_name(Pid)

-spec get_name(Pid :: pid()) -> string().

get_restart_type(SupPid, Id)

-spec get_restart_type(SupPid :: pid(), Id :: term()) -> child_restart_type().

get_strategy(SupPid)

-spec get_strategy(SupPid :: pid()) -> supervisor_strategy().

parent_info(Pid)

-spec parent_info(Pid :: pid()) -> {ok, parent_info()} | {error, term()}.

resolve_pid(Pid)

-spec resolve_pid(Pid :: term()) -> pid().