Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

38 linhas
1.2 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. %% Before OTP 18 tuples must be used to specify a child. e.g.
  23. %% Child :: {Id,StartFunc,Restart,Shutdown,Type,Modules}
  24. init([]) ->
  25. {ok, { {one_for_all, 0, 1}, []} }.
  26. %%====================================================================
  27. %% Internal functions
  28. %%====================================================================