-
Notifications
You must be signed in to change notification settings - Fork 1
/
sup.erl
36 lines (26 loc) · 813 Bytes
/
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
%%%-------------------------------------------------------------------
%%% @author Thomas Arts <[email protected]>
%%% @copyright (C) 2017, Thomas Arts
%%% @doc
%%%
%%% @end
%%% Created : 25 Jul 2017 by Thomas Arts <[email protected]>
%%%-------------------------------------------------------------------
-module(sup).
-behaviour(supervisor).
%% API
-export([start_link/0]).
%% Supervisor callbacks
-export([init/1]).
-define(SERVER, ?MODULE).
start_link() ->
supervisor:start_link({local, ?SERVER}, ?MODULE, []).
init([]) ->
SupFlags = #{strategy => one_for_one,
intensity => 1,
period => 5},
Children =
[ #{id => clock, start => {clock, start_link, []}},
#{id => gui, start => {gui, start_link, []}}
],
{ok, {SupFlags, Children}}.