Module e2_supervisor

e2 supervisor.

Copyright 2011-2012 Garrett Smith

Behaviours: supervisor.

Authors: Garrett Smith (g@rre.tt).

Description

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.

Function Index

start_link/2Starts a linked e2 supervisor.
start_link/3Starts a linked e2 supervisor.
supervisor_spec/2Returns an OTP supervisor spec for a list of child specs and e2 supervisor options.

Function Details

start_link/2

start_link(Module, ChildrenOrArgs) -> any()

Equivalent to start_link(Module, ChildrenOrArgs, []).

Starts a linked e2 supervisor.

start_link/3

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.

Defaults

  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/2

supervisor_spec(Children, Options) -> OTPSupervisorSpec

Returns an OTP supervisor spec for a list of child specs and e2 supervisor options.

See start_link/3 for details on ChildSpec and Options.


Generated by EDoc, Jul 7 2014, 18:01:43.