1 -module (lwes_channel_sup
).
3 -behaviour (supervisor
).
6 -export ([ start_link
/0,
9 %% supervisor callbacks
12 %%====================================================================
14 %%====================================================================
15 %% @spec start_link() -> ServerRet
16 %% @doc API for starting the supervisor.
18 supervisor:start_link({local
, ?MODULE
}, ?MODULE
, []).
20 open_channel (Channel
) ->
21 supervisor:start_child (?MODULE
, [Channel
]).
23 %%====================================================================
24 %% supervisor callbacks
25 %%====================================================================
26 %% @spec init([]) -> SupervisorTree
27 %% @doc supervisor callback.
31 {simple_one_for_one
, 10, 10},
33 {lwes_channel
, start_link
, []},
43 %%====================================================================
45 %%====================================================================
47 -include_lib ("eunit/include/eunit.hrl").