emqx/apps/emqx_ctl/src/emqx_ctl_sup.erl
2023-02-17 09:50:50 +01:00

34 lines
720 B
Erlang

%%%-------------------------------------------------------------------
%% @doc emqx_ctl top level supervisor.
%% @end
%%%-------------------------------------------------------------------
-module(emqx_ctl_sup).
-behaviour(supervisor).
-export([start_link/0]).
-export([init/1]).
-define(SERVER, ?MODULE).
start_link() ->
supervisor:start_link({local, ?SERVER}, ?MODULE, []).
init([]) ->
SupFlags = #{
strategy => one_for_all,
intensity => 0,
period => 1
},
ChildSpecs = [
#{
id => emqx_ctl,
start => {emqx_ctl, start_link, []},
type => worker,
restart => permanent
}
],
{ok, {SupFlags, ChildSpecs}}.