Behaviours: gen_server.
This module defines the supervisor2 behaviour.
Required callback functions: init/1.
call() = which_children | count_children | {term(), term()}
XXX: refine
child() = undefined | pid()
child_id() = term()
child_rec() = #child{pid = child() | {restarting, pid() | undefined} | [pid()], id = child_id(), mfargs = mfargs(), restart_type = restart(), shutdown = shutdown(), child_type = worker(), modules = modules()}
child_spec() = #{id := child_id(), start := mfargs(), restart => restart(), shutdown => shutdown(), type => worker(), modules => modules()} | {Id::child_id(), StartFunc::mfargs(), Restart::restart(), Shutdown::shutdown(), Type::worker(), Modules::modules()}
children() = {Ids::[child_id()], Db::#{child_id() => child_rec()}}
delay() = non_neg_integer()
init_sup_name() = sup_name() | self
mfargs() = {M::module(), F::atom(), A::[term()] | undefined}
modules() = [module()] | dynamic
restart() = permanent | transient | temporary | intrinsic | {permanent, delay()} | {transient, delay()} | {intrinsic, delay()}
shutdown() = brutal_kill | timeout()
startchild_err() = already_present | {already_started, Child::child()} | term()
startchild_ret() = {ok, Child::child()} | {ok, Child::child(), Info::term()} | {error, startchild_err()}
startlink_err() = {already_started, pid()} | {shutdown, term()} | term()
startlink_ret() = {ok, pid()} | ignore | {error, startlink_err()}
state() = #state{name = any(), strategy = strategy() | undefined, children = children(), dynamics = {maps, #{pid() => list()}} | {sets, sets:set(pid())} | undefined, intensity = non_neg_integer() | undefined, period = pos_integer() | undefined, restarts = any(), dynamic_restarts = non_neg_integer(), module = any(), args = any()}
stop_rsn() = {shutdown, term()} | {bad_return, {module(), init, term()}} | {bad_start_spec, term()} | {start_spec, term()} | {supervisor_data, term()}
strategy() = one_for_all | one_for_one | rest_for_one | simple_one_for_one
sup_flags() = #{strategy => strategy(), intensity => non_neg_integer(), period => pos_integer()} | {RestartStrategy::strategy(), Intensity::non_neg_integer(), Period::pos_integer()}
sup_name() = {local, Name::atom()} | {global, Name::atom()} | {via, Module::module(), Name::any()}
sup_ref() = (Name::atom()) | {Name::atom(), Node::node()} | {global, Name::atom()} | {via, Module::module(), Name::any()} | pid()
worker() = worker | supervisor
check_childspecs(ChildSpecs) -> Result
count_children(SupRef) -> PropListOfCounts
delete_child(SupRef, Id) -> Result
format_status(X1, X2) -> any()
get_callback_module(Pid) -> Module
get_childspec(SupRef, Id) -> Result
handle_cast(X1::{try_again_restart, child_id() | {restarting, pid()}}, State::state()) -> {noreply, state()} | {stop, shutdown, state()}
init(X1::{init_sup_name(), module(), [term()]}) -> {ok, state()} | ignore | {stop, stop_rsn()}
restart_child(SupRef, Id) -> Result
start_child(SupRef, ChildSpec) -> startchild_ret()
start_link(SupName, Module, Args) -> startlink_ret()
terminate(Reason::term(), State::state()) -> ok
terminate_child(SupRef, Id) -> Result
which_children(SupRef) -> [{Id, Child, Type, Modules}]
Generated by EDoc