Copyright © 2011-2016 Garrett Smith
Authors: Garrett Smith ([email protected]).
e2 supervisor.
An e2 supervisor provides identical functionality to that of an OTP supervisor but uses a simpler interface.
See e2 supervisor documentation for more information.start_child/2 | Adds a child spec to a supervisor and starts the child process. |
start_link/2 | Starts a linked e2 supervisor. |
start_link/3 | Starts a linked e2 supervisor. |
supervisor_spec/2 | Returns an OTP supervisor spec for a list of child specs and e2 supervisor options. |
start_child(Sup::Supervisor, Args::ChildSpecOrArgs) -> Result
Adds a child spec to a supervisor and starts the child process.
start_link(Module, ChildrenOrArgs) -> any()
Equivalent to start_link(Module, ChildrenOrArgs, []).
Starts a linked e2 supervisor.
start_link(Module, ChildrenOrArgs, Options) -> {ok, Pid} | {error, Reason}
Starts a linked e2 supervisor.
The e2 supervisor API lets you create child specs with minimal complexity, picking sensible defaults for missing values.
If Module
exports init/1
, ChildrenOrArgs
will be used as the
argument to that function and the result of that function will be used
as the child spec.
Function = start_link Args = [] ChildOptions = [{id, Module}, {restart, permanent}, {shutdown, brutal_kill}] Options = [{strategy, one_for_one}, {max_restart, {1, 1}}]Refer to e2 supervisor and e2 applications documentation for more information.
supervisor_spec(Children, Options) -> OTPSupervisorSpec
Returns an OTP supervisor spec for a list of child specs and e2 supervisor options.
Seestart_link/3
for details on ChildSpec
and Options
.
Generated by EDoc