3 -behaviour (supervisor
).
6 -include_lib("eunit/include/eunit.hrl").
10 -export([start_link
/0]).
12 %% supervisor callbacks
15 %%====================================================================
17 %%====================================================================
18 %% @spec start_link() -> ServerRet
19 %% @doc API for starting the supervisor.
21 supervisor:start_link({local
, ?MODULE
}, ?MODULE
, []).
23 %%====================================================================
24 %% supervisor callbacks
25 %%====================================================================
26 %% @spec init([]) -> SupervisorTree
27 %% @doc supervisor callback.
31 { one_for_one
, 10, 10 },
33 { lwes_channel_manager
, % child spec id
34 { lwes_channel_manager
, start_link
, [] },% child function to call
35 permanent
, % always restart
36 2000, % time to wait for child stop
37 worker
, % type of child
38 [ lwes_channel_manager
] % modules used by child
41 lwes_channel_sup
, % child spec id
42 { lwes_channel_sup
, start_link
, []}, % child function to call
43 permanent
, % always restart
44 2000, % time to wait for child stop
45 supervisor
, % type of child
46 [lwes_channel_sup
] % modules used by child
52 %%====================================================================
54 %%====================================================================