feat: add emqx enterprise app connector & bridge

This commit is contained in:
DDDHuang 2022-07-25 09:36:45 +08:00
parent 7ad0dc7c73
commit e4eba157c3
14 changed files with 187 additions and 2 deletions

19
lib-ee/emqx_ee_bridge/.gitignore vendored Normal file
View File

@ -0,0 +1,19 @@
.rebar3
_*
.eunit
*.o
*.beam
*.plt
*.swp
*.swo
.erlang.cookie
ebin
log
erl_crash.dump
.rebar
logs
_build
.idea
*.iml
rebar3.crashdump
*~

View File

@ -0,0 +1,9 @@
emqx_ee_bridge
=====
An OTP application
Build
-----
$ rebar3 compile

View File

@ -0,0 +1,6 @@
{erl_opts, [debug_info]}.
{deps, []}.
{shell, [
{apps, [emqx_ee_bridge]}
]}.

View File

@ -0,0 +1,14 @@
{application, emqx_ee_bridge, [
{description, "An OTP application"},
{vsn, "0.1.0"},
{registered, []},
{mod, {emqx_ee_bridge_app, []}},
{applications, [
kernel,
stdlib
]},
{env, []},
{modules, []},
{links, []}
]}.

View File

@ -0,0 +1,17 @@
%%--------------------------------------------------------------------
%% Copyright (c) 2022 EMQ Technologies Co., Ltd. All Rights Reserved.
%%--------------------------------------------------------------------
-module(emqx_ee_bridge_app).
-behaviour(application).
-export([start/2, stop/1]).
start(_StartType, _StartArgs) ->
emqx_ee_bridge_sup:start_link().
stop(_State) ->
ok.
%% internal functions

View File

@ -0,0 +1,27 @@
%%--------------------------------------------------------------------
%% Copyright (c) 2022 EMQ Technologies Co., Ltd. All Rights Reserved.
%%--------------------------------------------------------------------
-module(emqx_ee_bridge_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 = [],
{ok, {SupFlags, ChildSpecs}}.
%% internal functions

19
lib-ee/emqx_ee_connector/.gitignore vendored Normal file
View File

@ -0,0 +1,19 @@
.rebar3
_*
.eunit
*.o
*.beam
*.plt
*.swp
*.swo
.erlang.cookie
ebin
log
erl_crash.dump
.rebar
logs
_build
.idea
*.iml
rebar3.crashdump
*~

View File

@ -0,0 +1,9 @@
emqx_ee_connector
=====
An OTP application
Build
-----
$ rebar3 compile

View File

@ -0,0 +1,6 @@
{erl_opts, [debug_info]}.
{deps, []}.
{shell, [
{apps, [emqx_ee_connector]}
]}.

View File

@ -0,0 +1,14 @@
{application, emqx_ee_connector, [
{description, "An OTP application"},
{vsn, "0.1.0"},
{registered, []},
{mod, {emqx_ee_connector_app, []}},
{applications, [
kernel,
stdlib
]},
{env, []},
{modules, []},
{links, []}
]}.

View File

@ -0,0 +1,17 @@
%%--------------------------------------------------------------------
%% Copyright (c) 2022 EMQ Technologies Co., Ltd. All Rights Reserved.
%%--------------------------------------------------------------------
-module(emqx_ee_connector_app).
-behaviour(application).
-export([start/2, stop/1]).
start(_StartType, _StartArgs) ->
emqx_ee_connector_sup:start_link().
stop(_State) ->
ok.
%% internal functions

View File

@ -0,0 +1,27 @@
%%--------------------------------------------------------------------
%% Copyright (c) 2022 EMQ Technologies Co., Ltd. All Rights Reserved.
%%--------------------------------------------------------------------
-module(emqx_ee_connector_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 = [],
{ok, {SupFlags, ChildSpecs}}.
%% internal functions

View File

@ -9,6 +9,5 @@
{env, []},
{modules, []},
{licenses, ["Apache 2.0"]},
{links, []}
]}.

View File

@ -378,7 +378,9 @@ is_app(Name) ->
relx_apps_per_edition(ee) ->
[
emqx_license,
{emqx_enterprise_conf, load}
{emqx_enterprise_conf, load},
emqx_ee_connector,
emqx_ee_bridge
];
relx_apps_per_edition(ce) ->
[].