supervise/2 | Receives a list of children (workers or supervisors) to supervise and a set of options. |
supervisor/2 | Equivalent to supervisor(Module, Args, []). |
supervisor/3 |
Defines the given Module as a supervisor which will be started
with the given arguments. |
worker/2 | Equivalent to worker(Module, Args, []). |
worker/3 |
Defines the given Module as a worker which will be started
with the given arguments. |
supervise(Children::[supervisor:child_spec()], SupFlags::supervisor:sup_flags()) -> {ok, tuple()}
Receives a list of children (workers or supervisors) to supervise and a set of options. Returns a tuple containing the supervisor specification.
Example:
ebus_supervisor_spec:supervise(Children, #{strategy => one_for_one}).
supervisor(Module, Args) -> any()
Equivalent to supervisor(Module, Args, []).
supervisor(Module::module(), Args::[term()], Spec::map()) -> supervisor:child_spec()
Defines the given Module
as a supervisor which will be started
with the given arguments.
Example:
ebus_supervisor_spec:supervisor(my_sup, [], #{restart => permanent}).
By default, the function start_link
is invoked on the given
module. Overall, the default values for the options are:
#{ id => Module, start => {Module, start_link, Args}, restart => permanent, shutdown => infinity, modules => [module] }
worker(Module, Args) -> any()
Equivalent to worker(Module, Args, []).
worker(Module::module(), Args::[term()], Spec::map()) -> supervisor:child_spec()
Defines the given Module
as a worker which will be started
with the given arguments.
Example:
ebus_supervisor_spec:worker(my_module, [], #{restart => permanent}).
By default, the function start_link
is invoked on the given
module. Overall, the default values for the options are:
#{ id => Module, start => {Module, start_link, Args}, restart => permanent, shutdown => 5000, modules => [module] }
Generated by EDoc