Module consumer_supervisor

Behaviours: gen_stage.

Data Types

option()

option() = {registry, atom()} | {strategy, supervisor:strategy()} | {max_restarts, non_neg_integer()} | {max_records, non_neg_integer()} | {subscribe_to, [gen_stage:stage() | {gen_stage:stage(), [{atom(), any()}]}]}

Function Index

code_change/3
count_children/1
handle_call/3
handle_cancel/3
handle_cast/2
handle_events/3
handle_info/2
handle_subscribe/4
init/1
save_child/5
start_child/2
start_child/3
start_link/2 Starts a supervisor with the given children.
start_link/4
terminate/2
terminate_child/2
wait_children/6
which_children/1

Function Details

code_change/3

code_change(X1, State, X3) -> any()

count_children/1

count_children(Supervisor::supervisor:sup_ref()) -> #{specs => non_neg_integer(), active => non_neg_integer(), supervisors => non_neg_integer(), workers => non_neg_integer()}

handle_call/3

handle_call(X1, From, State) -> any()

handle_cancel/3

handle_cancel(X1, X2, State) -> any()

handle_cast/2

handle_cast(Msg, State) -> any()

handle_events/3

handle_events(Events, From, State) -> any()

handle_info/2

handle_info(Msg, State) -> any()

handle_subscribe/4

handle_subscribe(X1, Opts, From, State) -> any()

init/1

init(X1) -> any()

save_child/5

save_child(X1, Producer, Pid, Args, State) -> any()

start_child/2

start_child(Supervisor::supervisor:sup_ref(), Args::[term()]) -> supervisor:startchild_ret()

start_child/3

start_child(M, F, A) -> any()

start_link/2

start_link(Mod::module(), Args::any()) -> supervisor:startlink_ret()

Starts a supervisor with the given children.

A strategy is required to be given as an option. Furthermore, the max_restarts, max_seconds, and subscribe_to values can be configured as described in the documentation for the init/1 callback.

The options can also be used to register a supervisor name. The supported values are described under the "Name Registration" section in the gen_server module docs. The child processes specified in children will be started by appending the event to process to the existing function arguments in the child specification.

Note that the consumer supervisor is linked to the parent process and will exit not only on crashes but also if the parent process exits with normal reason.

start_link/4

start_link(Name::term(), Mod::module(), Args::any(), Opts::[option()]) -> supervisor:startlink_ret()

terminate/2

terminate(X1, State) -> any()

terminate_child/2

terminate_child(Supervisor::supervisor:sup_ref(), Pid::pid()) -> ok | {error, not_found}

wait_children/6

wait_children(Restart, Shutdown, Pids, Size, Timer, Stacks) -> any()

which_children/1

which_children(Supervisor::supervisor:sup_ref()) -> [{undefined, pid() | restarting, worker | supervisor, dynamic | [module()]}]


Generated by EDoc