1%% -*- mode: erlang; tab-width: 4; indent-tabs-mode: 1; st-rulers: [70] -*-
2%% vim: ts=4 sw=4 ft=erlang noet
3%%%-------------------------------------------------------------------
4%%% @author Andrew Bennett <potatosaladx@gmail.com>
5%%% @copyright 2014-2015, Andrew Bennett
6%%% @doc
7%%%
8%%% @end
9%%% Created :  06 Aug 2015 by Andrew Bennett <potatosaladx@gmail.com>
10%%%-------------------------------------------------------------------
11-module(jose_sup).
12-behaviour(supervisor).
13
14-define(SERVER, ?MODULE).
15
16%% API
17-export([start_link/0]).
18
19%% Supervisor callbacks
20-export([init/1]).
21
22%% Helper macro for declaring children of supervisor
23-define(CHILD(I, Type), {I, {I, start_link, []}, permanent, 5000, Type, [I]}).
24
25%%%===================================================================
26%%% API functions
27%%%===================================================================
28
29start_link() ->
30	supervisor:start_link({local, ?SERVER}, ?MODULE, []).
31
32%%%===================================================================
33%%% Supervisor callbacks
34%%%===================================================================
35
36%% @private
37init([]) ->
38	ChildSpecs = [
39		?CHILD(jose_server, worker)
40	],
41	Restart = {one_for_one, 10, 10},
42	{ok, {Restart, ChildSpecs}}.
43
44%%%-------------------------------------------------------------------
45%%% Internal functions
46%%%-------------------------------------------------------------------
47