Current section
Files
Jump to
Current section
Files
src/aws_cli_sup.erl
-module(aws_cli_sup).
-behaviour(supervisor).
%% API
-export([start_link/0]).
%% Supervisor callbacks
-export([init/1]).
-define(SERVER, ?MODULE).
%% 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, ?SERVER}, ?MODULE, []).
%%====================================================================
%% Supervisor callbacks
%%====================================================================
init([]) ->
Children =
[
?CHILD(aws_cli, worker)
],
{ok, { {one_for_all, 5, 10}, Children} }.
%%====================================================================
%% Internal functions
%%====================================================================