forked from gotthardp/lorawan-server
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlorawan_sup.erl
More file actions
36 lines (32 loc) · 1.12 KB
/
lorawan_sup.erl
File metadata and controls
36 lines (32 loc) · 1.12 KB
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
36
%
% Copyright (c) 2016-2019 Petr Gotthard <[email protected]>
% All rights reserved.
% Distributed under the terms of the MIT License. See the LICENSE file.
%
-module(lorawan_sup).
-behaviour(supervisor).
-export([start_link/0]).
-export([init/1]).
-spec start_link() -> {ok, pid()}.
start_link() ->
supervisor:start_link(?MODULE, []).
init([]) ->
lorawan_utils:throw_info({server, node()}, started, unique),
{ok, {{one_for_one, 2, 10}, [
{db_guard,
{lorawan_db_guard, start_link, []},
permanent, 5000, worker, [lorawan_db_guard]},
{gateways,
{lorawan_gw_sup, start_link, []},
permanent, infinity, supervisor, [lorawan_gw_sup]},
{http_registry,
{lorawan_http_registry, start_link, []},
permanent, 5000, worker, [lorawan_http_registry]},
{prometheus,
{lorawan_prometheus, start_link, []},
permanent, 5000, worker, [lorawan_prometheus]},
{backends,
{lorawan_backend_sup, start_link, []},
permanent, infinity, supervisor, [lorawan_backend_sup]}
]}}.
% end of file