diff options
Diffstat (limited to 'priv/templates/sup.erl')
| -rw-r--r-- | priv/templates/sup.erl | 33 |
1 files changed, 15 insertions, 18 deletions
diff --git a/priv/templates/sup.erl b/priv/templates/sup.erl index 020021c..42f5511 100644 --- a/priv/templates/sup.erl +++ b/priv/templates/sup.erl @@ -8,32 +8,29 @@ -behaviour(supervisor). -%% API -export([start_link/0]). -%% Supervisor callbacks -export([init/1]). -define(SERVER, ?MODULE). -%%==================================================================== -%% API functions -%%==================================================================== - start_link() -> supervisor:start_link({local, ?SERVER}, ?MODULE, []). -%%==================================================================== -%% Supervisor callbacks -%%==================================================================== - -%% Child :: #{id => Id, start => {M, F, A}} -%% Optional keys are restart, shutdown, type, modules. -%% Before OTP 18 tuples must be used to specify a child. e.g. -%% Child :: {Id,StartFunc,Restart,Shutdown,Type,Modules} +%% sup_flags() = #{strategy => strategy(), % optional +%% intensity => non_neg_integer(), % optional +%% period => pos_integer()} % optional +%% child_spec() = #{id => child_id(), % mandatory +%% start => mfargs(), % mandatory +%% restart => restart(), % optional +%% shutdown => shutdown(), % optional +%% type => worker(), % optional +%% modules => modules()} % optional init([]) -> - {ok, {{one_for_all, 0, 1}, []}}. + SupFlags = #{strategy => one_for_all, + intensity => 0, + period => 1}, + ChildSpecs = [], + {ok, {SupFlags, ChildSpecs}}. -%%==================================================================== -%% Internal functions -%%==================================================================== +%% internal functions |
