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

36 行
1.0 KiB

  1. %%%-------------------------------------------------------------------
  2. %% @doc {{name}} top level supervisor.
  3. %% @end
  4. %%%-------------------------------------------------------------------
  5. -module({{name}}_sup).
  6. -behaviour(supervisor).
  7. %% API
  8. -export([start_link/0]).
  9. %% Supervisor callbacks
  10. -export([init/1]).
  11. -define(SERVER, ?MODULE).
  12. %%====================================================================
  13. %% API functions
  14. %%====================================================================
  15. start_link() ->
  16. supervisor:start_link({local, ?SERVER}, ?MODULE, []).
  17. %%====================================================================
  18. %% Supervisor callbacks
  19. %%====================================================================
  20. %% Child :: #{id => Id, start => {M, F, A}}
  21. %% Optional keys are restart, shutdown, type, modules.
  22. init([]) ->
  23. {ok, { {one_for_all, 0, 1}, []} }.
  24. %%====================================================================
  25. %% Internal functions
  26. %%====================================================================