You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
1.1 KiB

пре 10 година
пре 10 година
пре 15 година
пре 10 година
пре 15 година
пре 10 година
пре 15 година
пре 15 година
пре 15 година
  1. {{=@@ @@=}}
  2. %%%-------------------------------------------------------------------
  3. %% @doc @@name@@ top level supervisor.
  4. %% @end
  5. %%%-------------------------------------------------------------------
  6. -module(@@name@@_sup).
  7. -behaviour(supervisor).
  8. -export([start_link/0]).
  9. -export([init/1]).
  10. -define(SERVER, ?MODULE).
  11. start_link() ->
  12. supervisor:start_link({local, ?SERVER}, ?MODULE, []).
  13. %% sup_flags() = #{strategy => strategy(), % optional
  14. %% intensity => non_neg_integer(), % optional
  15. %% period => pos_integer()} % optional
  16. %% child_spec() = #{id => child_id(), % mandatory
  17. %% start => mfargs(), % mandatory
  18. %% restart => restart(), % optional
  19. %% shutdown => shutdown(), % optional
  20. %% type => worker(), % optional
  21. %% modules => modules()} % optional
  22. init([]) ->
  23. SupFlags = #{strategy => one_for_all,
  24. intensity => 0,
  25. period => 1},
  26. ChildSpecs = [],
  27. {ok, {SupFlags, ChildSpecs}}.
  28. %% internal functions