1 -module (lwes_channel_sup
).
3 -behaviour (supervisor
).
6 -include_lib("eunit/include/eunit.hrl").
10 -export ([ start_link
/0,
13 %% supervisor callbacks
16 %%====================================================================
18 %%====================================================================
19 %% @spec start_link() -> ServerRet
20 %% @doc API for starting the supervisor.
22 supervisor:start_link({local
, ?MODULE
}, ?MODULE
, []).
24 open_channel (Channel
) ->
25 supervisor:start_child (?MODULE
, [Channel
]).
27 %%====================================================================
28 %% supervisor callbacks
29 %%====================================================================
30 %% @spec init([]) -> SupervisorTree
31 %% @doc supervisor callback.
35 {simple_one_for_one
, 10, 10},
37 {lwes_channel
, start_link
, []},
47 %%====================================================================
49 %%====================================================================