fix: ee bridge & connector remove app mod
This commit is contained in:
parent
fa4bc921ac
commit
be6de4aad0
|
@ -183,7 +183,7 @@ conn_bridge_examples(Method) ->
|
||||||
EE = ee_conn_bridge_examples(Method),
|
EE = ee_conn_bridge_examples(Method),
|
||||||
maps:merge(Broker, EE).
|
maps:merge(Broker, EE).
|
||||||
|
|
||||||
-ifdef(EMQX_RELEASE_EDITION).
|
-if(?EMQX_RELEASE_EDITION == ee).
|
||||||
ee_conn_bridge_examples(Method) ->
|
ee_conn_bridge_examples(Method) ->
|
||||||
emqx_ee_bridge:conn_bridge_examples(Method).
|
emqx_ee_bridge:conn_bridge_examples(Method).
|
||||||
-else.
|
-else.
|
||||||
|
|
|
@ -42,7 +42,7 @@ stop(_State) ->
|
||||||
ok = emqx_bridge:unload_hook(),
|
ok = emqx_bridge:unload_hook(),
|
||||||
ok.
|
ok.
|
||||||
|
|
||||||
-ifdef(EMQX_RELEASE_EDITION).
|
-if(?EMQX_RELEASE_EDITION == ee).
|
||||||
start_ee_apps() ->
|
start_ee_apps() ->
|
||||||
{ok, _} = application:ensure_all_started(emqx_ee_bridge),
|
{ok, _} = application:ensure_all_started(emqx_ee_bridge),
|
||||||
{ok, _} = application:ensure_all_started(emqx_ee_connector),
|
{ok, _} = application:ensure_all_started(emqx_ee_connector),
|
||||||
|
|
|
@ -42,7 +42,7 @@
|
||||||
reset_metrics/1
|
reset_metrics/1
|
||||||
]).
|
]).
|
||||||
|
|
||||||
-ifdef(EMQX_RELEASE_EDITION).
|
-if(?EMQX_RELEASE_EDITION == ee).
|
||||||
bridge_to_resource_type(<<"mqtt">>) -> emqx_connector_mqtt;
|
bridge_to_resource_type(<<"mqtt">>) -> emqx_connector_mqtt;
|
||||||
bridge_to_resource_type(mqtt) -> emqx_connector_mqtt;
|
bridge_to_resource_type(mqtt) -> emqx_connector_mqtt;
|
||||||
bridge_to_resource_type(<<"webhook">>) -> emqx_connector_http;
|
bridge_to_resource_type(<<"webhook">>) -> emqx_connector_http;
|
||||||
|
@ -291,11 +291,11 @@ parse_confs(Type = mqtt, Name, #{connector := ConnectorConfs, direction := Direc
|
||||||
parse_confs(Type, Name, Conf) ->
|
parse_confs(Type, Name, Conf) ->
|
||||||
parse_enterprise_confs(Type, Name, Conf).
|
parse_enterprise_confs(Type, Name, Conf).
|
||||||
|
|
||||||
-ifdef(EMQX_RELEASE_EDITION).
|
-if(?EMQX_RELEASE_EDITION == ee).
|
||||||
parse_enterprise_confs(Type, Name, Conf) ->
|
parse_enterprise_confs(Type, Name, Conf) ->
|
||||||
emqx_ee_bridge:parse_conf(Type, Name, Conf).
|
emqx_ee_bridge:parse_conf(Type, Name, Conf).
|
||||||
-else.
|
-else.
|
||||||
parse_enterprise_confs(Type, Name, Conf) ->
|
parse_enterprise_confs(Type, Name, _Conf) ->
|
||||||
error({not_supported, Type, Name}).
|
error({not_supported, Type, Name}).
|
||||||
-endif.
|
-endif.
|
||||||
|
|
||||||
|
|
|
@ -48,7 +48,7 @@ http_schema(Method) ->
|
||||||
ExtSchemas = [ref(Module, Method) || Module <- schema_modules()],
|
ExtSchemas = [ref(Module, Method) || Module <- schema_modules()],
|
||||||
hoconsc:union(Schemas ++ ExtSchemas).
|
hoconsc:union(Schemas ++ ExtSchemas).
|
||||||
|
|
||||||
-ifdef(EMQX_RELEASE_EDITION).
|
-if(?EMQX_RELEASE_EDITION == ee).
|
||||||
schema_modules() ->
|
schema_modules() ->
|
||||||
[emqx_bridge_webhook_schema] ++ emqx_ee_bridge:schema_modules().
|
[emqx_bridge_webhook_schema] ++ emqx_ee_bridge:schema_modules().
|
||||||
-else.
|
-else.
|
||||||
|
@ -158,7 +158,7 @@ fields("node_status") ->
|
||||||
{"status", mk(status(), #{})}
|
{"status", mk(status(), #{})}
|
||||||
].
|
].
|
||||||
|
|
||||||
-ifdef(EMQX_RELEASE_EDITION).
|
-if(?EMQX_RELEASE_EDITION == ee).
|
||||||
ee_fields_bridges() ->
|
ee_fields_bridges() ->
|
||||||
emqx_ee_bridge:fields(bridges).
|
emqx_ee_bridge:fields(bridges).
|
||||||
-else.
|
-else.
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
{application, emqx_ee_bridge, [
|
{application, emqx_ee_bridge, [
|
||||||
{description, "An OTP application"},
|
|
||||||
{vsn, "0.1.0"},
|
{vsn, "0.1.0"},
|
||||||
{registered, []},
|
{registered, []},
|
||||||
{mod, {emqx_ee_bridge_app, []}},
|
|
||||||
{applications, [
|
{applications, [
|
||||||
kernel,
|
kernel,
|
||||||
stdlib
|
stdlib
|
||||||
|
|
|
@ -1,17 +0,0 @@
|
||||||
%%--------------------------------------------------------------------
|
|
||||||
%% 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
|
|
|
@ -1,27 +0,0 @@
|
||||||
%%--------------------------------------------------------------------
|
|
||||||
%% 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
|
|
|
@ -1,6 +1,6 @@
|
||||||
{erl_opts, [debug_info]}.
|
{erl_opts, [debug_info]}.
|
||||||
{deps, [
|
{deps, [
|
||||||
{hstreamdb_erl, {git, "https://github.com/hstreamdb/hstreamdb_erl.git", {tag, "0.2.4"}}}
|
{hstreamdb_erl, {git, "https://github.com/hstreamdb/hstreamdb_erl.git", {tag, "0.2.5"}}}
|
||||||
]}.
|
]}.
|
||||||
|
|
||||||
{shell, [
|
{shell, [
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
{application, emqx_ee_connector, [
|
{application, emqx_ee_connector, [
|
||||||
{description, "An OTP application"},
|
|
||||||
{vsn, "0.1.0"},
|
{vsn, "0.1.0"},
|
||||||
{registered, []},
|
{registered, []},
|
||||||
{mod, {emqx_ee_connector_app, []}},
|
|
||||||
{applications, [
|
{applications, [
|
||||||
kernel,
|
kernel,
|
||||||
stdlib,
|
stdlib,
|
||||||
|
|
|
@ -1,17 +0,0 @@
|
||||||
%%--------------------------------------------------------------------
|
|
||||||
%% 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
|
|
|
@ -1,27 +0,0 @@
|
||||||
%%--------------------------------------------------------------------
|
|
||||||
%% 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
|
|
Loading…
Reference in New Issue