您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

36 行
1.1 KiB

  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