-
Notifications
You must be signed in to change notification settings - Fork 461
/
trunkstore_sup.erl
36 lines (26 loc) · 955 Bytes
/
trunkstore_sup.erl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
-module(trunkstore_sup).
-behaviour(supervisor).
%% API
-export([start_link/0]).
%% Supervisor callbacks
-export([init/1]).
%% Helper macro for declaring children of supervisor
-define(CHILD(I, Type), {I, {I, start_link, []}, permanent, 5000, Type, [I]}).
%% ===================================================================
%% API functions
%% ===================================================================
start_link() ->
supervisor:start_link({local, ?MODULE}, ?MODULE, []).
%% ===================================================================
%% Supervisor callbacks
%% ===================================================================
init([]) ->
{ok, { {one_for_one, 5, 10}
, [
?CHILD(ts_call_sup, supervisor)
,?CHILD(ts_responder_sup, supervisor)
,?CHILD(ts_acctmgr, worker)
,?CHILD(ts_credit, worker)
,?CHILD(ts_carrier, worker)
,?CHILD(ts_cdr, worker)
]} }.