* feat(authorization): add authorization api * feat(authorization): add check function * feat(authorization): use hocon config file * feat(authz): add mysql connector * feat(authz): support pgsql * feat(connector): support redis * chore(authz): use "publish/subscribe/all" instead of "pub/sub/pubsub"
36 lines
1.1 KiB
Erlang
36 lines
1.1 KiB
Erlang
%%%-------------------------------------------------------------------
|
|
%% @doc emqx_authz top level supervisor.
|
|
%% @end
|
|
%%%-------------------------------------------------------------------
|
|
|
|
-module(emqx_authz_sup).
|
|
|
|
-behaviour(supervisor).
|
|
|
|
-export([start_link/0]).
|
|
|
|
-export([init/1]).
|
|
|
|
-define(SERVER, ?MODULE).
|
|
|
|
start_link() ->
|
|
supervisor:start_link({local, ?SERVER}, ?MODULE, []).
|
|
|
|
%% sup_flags() = #{strategy => strategy(), % optional
|
|
%% intensity => non_neg_integer(), % optional
|
|
%% period => pos_integer()} % optional
|
|
%% child_spec() = #{id => child_id(), % mandatory
|
|
%% start => mfargs(), % mandatory
|
|
%% restart => restart(), % optional
|
|
%% shutdown => shutdown(), % optional
|
|
%% type => worker(), % optional
|
|
%% modules => modules()} % optional
|
|
init([]) ->
|
|
SupFlags = #{strategy => one_for_all,
|
|
intensity => 0,
|
|
period => 1},
|
|
ChildSpecs = [],
|
|
{ok, {SupFlags, ChildSpecs}}.
|
|
|
|
%% internal functions
|