refactor: rm ee_bridge and ee_connector application
This commit is contained in:
parent
583ccfaafd
commit
b089fba100
|
@ -8,6 +8,7 @@
|
|||
kernel,
|
||||
stdlib,
|
||||
emqx,
|
||||
emqx_resource,
|
||||
emqx_connector
|
||||
]},
|
||||
{env, []},
|
||||
|
|
|
@ -175,14 +175,14 @@ bridge_info_examples(Method) ->
|
|||
value => info_example(mqtt, Method)
|
||||
}
|
||||
},
|
||||
ee_bridge_examples(Method)
|
||||
emqx_enterprise_bridge_examples(Method)
|
||||
).
|
||||
|
||||
-if(?EMQX_RELEASE_EDITION == ee).
|
||||
ee_bridge_examples(Method) ->
|
||||
emqx_ee_bridge:examples(Method).
|
||||
emqx_enterprise_bridge_examples(Method) ->
|
||||
emqx_bridge_enterprise:examples(Method).
|
||||
-else.
|
||||
ee_bridge_examples(_Method) -> #{}.
|
||||
emqx_enterprise_bridge_examples(_Method) -> #{}.
|
||||
-endif.
|
||||
|
||||
info_example(Type, Method) ->
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
|
||||
start(_StartType, _StartArgs) ->
|
||||
{ok, Sup} = emqx_bridge_sup:start_link(),
|
||||
ok = start_ee_apps(),
|
||||
ok = ensure_enterprise_schema_loaded(),
|
||||
ok = emqx_bridge:load(),
|
||||
ok = emqx_bridge:load_hook(),
|
||||
ok = emqx_config_handler:add_handler(?LEAF_NODE_HDLR_PATH, ?MODULE),
|
||||
|
@ -46,11 +46,11 @@ stop(_State) ->
|
|||
ok.
|
||||
|
||||
-if(?EMQX_RELEASE_EDITION == ee).
|
||||
start_ee_apps() ->
|
||||
{ok, _} = application:ensure_all_started(emqx_ee_bridge),
|
||||
ensure_enterprise_schema_loaded() ->
|
||||
_ = emqx_bridge_enterprise:module_info(),
|
||||
ok.
|
||||
-else.
|
||||
start_ee_apps() ->
|
||||
ensure_enterprise_schema_loaded() ->
|
||||
ok.
|
||||
-endif.
|
||||
|
||||
|
|
|
@ -64,7 +64,7 @@ bridge_to_resource_type(<<"mqtt">>) -> emqx_bridge_mqtt_connector;
|
|||
bridge_to_resource_type(mqtt) -> emqx_bridge_mqtt_connector;
|
||||
bridge_to_resource_type(<<"webhook">>) -> emqx_connector_http;
|
||||
bridge_to_resource_type(webhook) -> emqx_connector_http;
|
||||
bridge_to_resource_type(BridgeType) -> emqx_ee_bridge:resource_type(BridgeType).
|
||||
bridge_to_resource_type(BridgeType) -> emqx_bridge_enterprise:resource_type(BridgeType).
|
||||
-else.
|
||||
bridge_to_resource_type(<<"mqtt">>) -> emqx_bridge_mqtt_connector;
|
||||
bridge_to_resource_type(mqtt) -> emqx_bridge_mqtt_connector;
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
%%--------------------------------------------------------------------
|
||||
%% Copyright (c) 2022-2023 EMQ Technologies Co., Ltd. All Rights Reserved.
|
||||
%%--------------------------------------------------------------------
|
||||
-module(emqx_ee_bridge).
|
||||
-module(emqx_bridge_enterprise).
|
||||
|
||||
-if(?EMQX_RELEASE_EDITION == ee).
|
||||
|
||||
-include_lib("hocon/include/hoconsc.hrl").
|
||||
-import(hoconsc, [mk/2, enum/1, ref/2]).
|
||||
|
@ -365,3 +367,7 @@ rabbitmq_structs() ->
|
|||
|
||||
api_ref(Module, Type, Method) ->
|
||||
{Type, ref(Module, Method)}.
|
||||
|
||||
-else.
|
||||
|
||||
-endif.
|
|
@ -57,7 +57,7 @@ api_schema(Method) ->
|
|||
{<<"mqtt">>, emqx_bridge_mqtt_schema}
|
||||
]
|
||||
],
|
||||
EE = ee_api_schemas(Method),
|
||||
EE = enterprise_api_schemas(Method),
|
||||
hoconsc:union(bridge_api_union(Broker ++ EE)).
|
||||
|
||||
bridge_api_union(Refs) ->
|
||||
|
@ -86,36 +86,23 @@ bridge_api_union(Refs) ->
|
|||
end.
|
||||
|
||||
-if(?EMQX_RELEASE_EDITION == ee).
|
||||
ee_api_schemas(Method) ->
|
||||
ensure_loaded(emqx_ee_bridge, emqx_ee_bridge),
|
||||
case erlang:function_exported(emqx_ee_bridge, api_schemas, 1) of
|
||||
true -> emqx_ee_bridge:api_schemas(Method);
|
||||
enterprise_api_schemas(Method) ->
|
||||
case erlang:function_exported(emqx_bridge_enterprise, api_schemas, 1) of
|
||||
true -> emqx_bridge_enterprise:api_schemas(Method);
|
||||
false -> []
|
||||
end.
|
||||
|
||||
ee_fields_bridges() ->
|
||||
ensure_loaded(emqx_ee_bridge, emqx_ee_bridge),
|
||||
case erlang:function_exported(emqx_ee_bridge, fields, 1) of
|
||||
true -> emqx_ee_bridge:fields(bridges);
|
||||
enterprise_fields_bridges() ->
|
||||
case erlang:function_exported(emqx_bridge_enterprise, fields, 1) of
|
||||
true -> emqx_bridge_enterprise:fields(bridges);
|
||||
false -> []
|
||||
end.
|
||||
|
||||
%% must ensure the app is loaded before checking if fn is defined.
|
||||
ensure_loaded(App, Mod) ->
|
||||
try
|
||||
_ = application:load(App),
|
||||
_ = Mod:module_info(),
|
||||
ok
|
||||
catch
|
||||
_:_ ->
|
||||
ok
|
||||
end.
|
||||
|
||||
-else.
|
||||
|
||||
ee_api_schemas(_) -> [].
|
||||
enterprise_api_schemas(_) -> [].
|
||||
|
||||
ee_fields_bridges() -> [].
|
||||
enterprise_fields_bridges() -> [].
|
||||
|
||||
-endif.
|
||||
|
||||
|
@ -191,7 +178,7 @@ fields(bridges) ->
|
|||
end
|
||||
}
|
||||
)}
|
||||
] ++ ee_fields_bridges();
|
||||
] ++ enterprise_fields_bridges();
|
||||
fields("metrics") ->
|
||||
[
|
||||
{"dropped", mk(integer(), #{desc => ?DESC("metric_dropped")})},
|
||||
|
|
|
@ -1,8 +1,14 @@
|
|||
{application, emqx_bridge_cassandra, [
|
||||
{description, "EMQX Enterprise Cassandra Bridge"},
|
||||
{vsn, "0.1.2"},
|
||||
{vsn, "0.1.3"},
|
||||
{registered, []},
|
||||
{applications, [kernel, stdlib, ecql]},
|
||||
{applications, [
|
||||
kernel,
|
||||
stdlib,
|
||||
emqx_resource,
|
||||
emqx_bridge,
|
||||
ecql
|
||||
]},
|
||||
{env, []},
|
||||
{modules, []},
|
||||
{links, []}
|
||||
|
|
|
@ -396,7 +396,7 @@ conn_opts([Opt | Opts], Acc) ->
|
|||
%% prepare
|
||||
|
||||
%% XXX: hardcode
|
||||
%% note: the `cql` param is passed by emqx_ee_bridge_cassa
|
||||
%% note: the `cql` param is passed by emqx_bridge_cassandra
|
||||
parse_prepare_cql(#{cql := SQL}) ->
|
||||
parse_prepare_cql([{send_message, SQL}], #{}, #{});
|
||||
parse_prepare_cql(_) ->
|
||||
|
|
|
@ -170,9 +170,8 @@ common_init(Config0) ->
|
|||
ProxyPort = list_to_integer(os:getenv("PROXY_PORT", "8474")),
|
||||
emqx_common_test_helpers:reset_proxy(ProxyHost, ProxyPort),
|
||||
% Ensure EE bridge module is loaded
|
||||
_ = application:load(emqx_ee_bridge),
|
||||
_ = emqx_ee_bridge:module_info(),
|
||||
ok = emqx_common_test_helpers:start_apps([emqx_conf, emqx_bridge]),
|
||||
_ = emqx_bridge_enterprise:module_info(),
|
||||
emqx_mgmt_api_test_util:init_suite(),
|
||||
% Connect to cassnadra directly and create the table
|
||||
catch connect_and_drop_table(Config0),
|
||||
|
|
|
@ -56,7 +56,6 @@ init_per_suite(Config) ->
|
|||
ok = emqx_common_test_helpers:start_apps([emqx_conf]),
|
||||
ok = emqx_connector_test_helpers:start_apps([emqx_resource]),
|
||||
{ok, _} = application:ensure_all_started(emqx_connector),
|
||||
{ok, _} = application:ensure_all_started(emqx_ee_connector),
|
||||
%% keyspace `mqtt` must be created in advance
|
||||
{ok, Conn} =
|
||||
ecql:connect([
|
||||
|
@ -79,8 +78,7 @@ init_per_suite(Config) ->
|
|||
end_per_suite(_Config) ->
|
||||
ok = emqx_common_test_helpers:stop_apps([emqx_conf]),
|
||||
ok = emqx_connector_test_helpers:stop_apps([emqx_resource]),
|
||||
_ = application:stop(emqx_connector),
|
||||
_ = application:stop(emqx_ee_connector).
|
||||
_ = application:stop(emqx_connector).
|
||||
|
||||
init_per_testcase(_, Config) ->
|
||||
Config.
|
||||
|
|
|
@ -1,8 +1,14 @@
|
|||
{application, emqx_bridge_clickhouse, [
|
||||
{description, "EMQX Enterprise ClickHouse Bridge"},
|
||||
{vsn, "0.2.1"},
|
||||
{vsn, "0.2.2"},
|
||||
{registered, []},
|
||||
{applications, [kernel, stdlib, clickhouse, emqx_resource]},
|
||||
{applications, [
|
||||
kernel,
|
||||
stdlib,
|
||||
emqx_resource,
|
||||
emqx_bridge,
|
||||
clickhouse
|
||||
]},
|
||||
{env, []},
|
||||
{modules, []},
|
||||
{links, []}
|
||||
|
|
|
@ -469,7 +469,7 @@ transform_and_log_clickhouse_result(ClickhouseErrorResult, ResourceID, SQL) ->
|
|||
reason => ClickhouseErrorResult
|
||||
}),
|
||||
case is_recoverable_error(ClickhouseErrorResult) of
|
||||
%% TODO: The hackeny errors that the clickhouse library forwards are
|
||||
%% TODO: The hackney errors that the clickhouse library forwards are
|
||||
%% very loosely defined. We should try to make sure that the following
|
||||
%% handles all error cases that we need to handle as recoverable_error
|
||||
true ->
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
-include_lib("emqx_connector/include/emqx_connector.hrl").
|
||||
|
||||
%% See comment in
|
||||
%% lib-ee/emqx_ee_connector/test/ee_bridge_clickhouse_connector_SUITE.erl for how to
|
||||
%% apps/emqx_bridge_clickhouse/test/emqx_bridge_clickhouse_connector_SUITE.erl for how to
|
||||
%% run this without bringing up the whole CI infrastucture
|
||||
|
||||
%%------------------------------------------------------------------------------
|
||||
|
|
|
@ -1,8 +1,14 @@
|
|||
{application, emqx_bridge_dynamo, [
|
||||
{description, "EMQX Enterprise Dynamo Bridge"},
|
||||
{vsn, "0.1.2"},
|
||||
{vsn, "0.1.3"},
|
||||
{registered, []},
|
||||
{applications, [kernel, stdlib, erlcloud]},
|
||||
{applications, [
|
||||
kernel,
|
||||
stdlib,
|
||||
emqx_resource,
|
||||
emqx_bridge,
|
||||
erlcloud
|
||||
]},
|
||||
{env, []},
|
||||
{modules, []},
|
||||
{links, []}
|
||||
|
|
|
@ -88,7 +88,7 @@ init_per_suite(Config) ->
|
|||
|
||||
end_per_suite(_Config) ->
|
||||
emqx_mgmt_api_test_util:end_suite(),
|
||||
ok = emqx_common_test_helpers:stop_apps([emqx_bridge, emqx_conf]),
|
||||
ok = emqx_common_test_helpers:stop_apps([emqx_bridge, emqx_resource, emqx_conf, erlcloud]),
|
||||
ok.
|
||||
|
||||
init_per_testcase(TestCase, Config) ->
|
||||
|
@ -128,10 +128,12 @@ common_init(ConfigT) ->
|
|||
ProxyHost = os:getenv("PROXY_HOST", "toxiproxy"),
|
||||
ProxyPort = list_to_integer(os:getenv("PROXY_PORT", "8474")),
|
||||
emqx_common_test_helpers:reset_proxy(ProxyHost, ProxyPort),
|
||||
% Ensure EE bridge module is loaded
|
||||
_ = application:load(emqx_ee_bridge),
|
||||
_ = emqx_ee_bridge:module_info(),
|
||||
ok = emqx_common_test_helpers:start_apps([emqx_conf, emqx_bridge]),
|
||||
% Ensure enterprise bridge module is loaded
|
||||
ok = emqx_common_test_helpers:start_apps([
|
||||
emqx_conf, emqx_resource, emqx_bridge
|
||||
]),
|
||||
_ = application:ensure_all_started(erlcloud),
|
||||
_ = emqx_bridge_enterprise:module_info(),
|
||||
emqx_mgmt_api_test_util:init_suite(),
|
||||
% setup dynamo
|
||||
setup_dynamo(Config0),
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
{application, emqx_bridge_gcp_pubsub, [
|
||||
{description, "EMQX Enterprise GCP Pub/Sub Bridge"},
|
||||
{vsn, "0.1.3"},
|
||||
{vsn, "0.1.4"},
|
||||
{registered, []},
|
||||
{applications, [
|
||||
kernel,
|
||||
stdlib,
|
||||
emqx_resource,
|
||||
emqx_bridge,
|
||||
ehttpc
|
||||
]},
|
||||
{env, []},
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
service_account_json_converter/1
|
||||
]).
|
||||
|
||||
%% emqx_ee_bridge "unofficial" API
|
||||
%% emqx_bridge_enterprise "unofficial" API
|
||||
-export([conn_bridge_examples/1]).
|
||||
|
||||
-type service_account_json() :: map().
|
||||
|
|
|
@ -2,7 +2,12 @@
|
|||
{description, "EMQX Enterprise HStreamDB Bridge"},
|
||||
{vsn, "0.1.1"},
|
||||
{registered, []},
|
||||
{applications, [kernel, stdlib]},
|
||||
{applications, [
|
||||
kernel,
|
||||
stdlib,
|
||||
emqx_resource,
|
||||
emqx_bridge
|
||||
]},
|
||||
{env, []},
|
||||
{modules, []},
|
||||
{links, []}
|
||||
|
|
|
@ -108,7 +108,7 @@ init_per_suite(Config) ->
|
|||
|
||||
end_per_suite(_Config) ->
|
||||
emqx_mgmt_api_test_util:end_suite(),
|
||||
ok = emqx_common_test_helpers:stop_apps([emqx_bridge, emqx_conf]),
|
||||
ok = emqx_common_test_helpers:stop_apps([emqx_bridge, emqx_resource, emqx_conf, hstreamdb_erl]),
|
||||
ok.
|
||||
|
||||
init_per_testcase(t_to_hrecord_failed, Config) ->
|
||||
|
@ -344,10 +344,9 @@ common_init(ConfigT) ->
|
|||
ProxyPort = list_to_integer(os:getenv("PROXY_PORT", "8474")),
|
||||
emqx_common_test_helpers:reset_proxy(ProxyHost, ProxyPort),
|
||||
% Ensure EE bridge module is loaded
|
||||
_ = application:load(emqx_ee_bridge),
|
||||
ok = emqx_common_test_helpers:start_apps([emqx_conf, emqx_resource, emqx_bridge]),
|
||||
_ = application:ensure_all_started(hstreamdb_erl),
|
||||
_ = emqx_ee_bridge:module_info(),
|
||||
ok = emqx_common_test_helpers:start_apps([emqx_conf, emqx_bridge]),
|
||||
_ = emqx_bridge_enterprise:module_info(),
|
||||
emqx_mgmt_api_test_util:init_suite(),
|
||||
% Connect to hstreamdb directly
|
||||
% drop old stream and then create new one
|
||||
|
|
|
@ -1,8 +1,14 @@
|
|||
{application, emqx_bridge_influxdb, [
|
||||
{description, "EMQX Enterprise InfluxDB Bridge"},
|
||||
{vsn, "0.1.2"},
|
||||
{vsn, "0.1.3"},
|
||||
{registered, []},
|
||||
{applications, [kernel, stdlib, influxdb]},
|
||||
{applications, [
|
||||
kernel,
|
||||
stdlib,
|
||||
emqx_resource,
|
||||
emqx_bridge,
|
||||
influxdb
|
||||
]},
|
||||
{env, []},
|
||||
{modules, []},
|
||||
{links, []}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
%% -*- mode: erlang -*-
|
||||
{application, emqx_bridge_iotdb, [
|
||||
{description, "EMQX Enterprise Apache IoTDB Bridge"},
|
||||
{vsn, "0.1.2"},
|
||||
{vsn, "0.1.3"},
|
||||
{modules, [
|
||||
emqx_bridge_iotdb,
|
||||
emqx_bridge_iotdb_impl
|
||||
|
@ -10,6 +10,9 @@
|
|||
{applications, [
|
||||
kernel,
|
||||
stdlib,
|
||||
emqx_resource,
|
||||
emqx_bridge,
|
||||
%% for module emqx_connector_http
|
||||
emqx_connector
|
||||
]},
|
||||
{env, []},
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
desc/1
|
||||
]).
|
||||
|
||||
%% emqx_ee_bridge "unofficial" API
|
||||
%% emqx_bridge_enterprise "unofficial" API
|
||||
-export([conn_bridge_examples/1]).
|
||||
|
||||
%%-------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -1,10 +1,13 @@
|
|||
%% -*- mode: erlang -*-
|
||||
{application, emqx_bridge_kafka, [
|
||||
{description, "EMQX Enterprise Kafka Bridge"},
|
||||
{vsn, "0.1.4"},
|
||||
{vsn, "0.1.5"},
|
||||
{registered, [emqx_bridge_kafka_consumer_sup]},
|
||||
{applications, [
|
||||
kernel,
|
||||
stdlib,
|
||||
emqx_resource,
|
||||
emqx_bridge,
|
||||
telemetry,
|
||||
wolff,
|
||||
brod,
|
||||
|
|
|
@ -40,7 +40,7 @@ query_mode(_) ->
|
|||
|
||||
callback_mode() -> async_if_possible.
|
||||
|
||||
%% @doc Config schema is defined in emqx_ee_bridge_kafka.
|
||||
%% @doc Config schema is defined in emqx_bridge_kafka.
|
||||
on_start(InstId, Config) ->
|
||||
#{
|
||||
authentication := Auth,
|
||||
|
|
|
@ -73,11 +73,9 @@ wait_until_kafka_is_up(Attempts) ->
|
|||
end.
|
||||
|
||||
init_per_suite(Config) ->
|
||||
%% ensure loaded
|
||||
_ = application:load(emqx_ee_bridge),
|
||||
_ = emqx_ee_bridge:module_info(),
|
||||
application:load(emqx_bridge),
|
||||
ok = emqx_common_test_helpers:start_apps([emqx_conf]),
|
||||
%% Ensure enterprise bridge module is loaded
|
||||
ok = emqx_common_test_helpers:start_apps([emqx_conf, emqx_bridge]),
|
||||
_ = emqx_bridge_enterprise:module_info(),
|
||||
ok = emqx_connector_test_helpers:start_apps(?APPS),
|
||||
{ok, _} = application:ensure_all_started(emqx_connector),
|
||||
emqx_mgmt_api_test_util:init_suite(),
|
||||
|
|
|
@ -1,8 +1,13 @@
|
|||
{application, emqx_bridge_matrix, [
|
||||
{description, "EMQX Enterprise MatrixDB Bridge"},
|
||||
{vsn, "0.1.1"},
|
||||
{vsn, "0.1.2"},
|
||||
{registered, []},
|
||||
{applications, [kernel, stdlib]},
|
||||
{applications, [
|
||||
kernel,
|
||||
stdlib,
|
||||
emqx_resource,
|
||||
emqx_bridge
|
||||
]},
|
||||
{env, []},
|
||||
{modules, []},
|
||||
{links, []}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{application, emqx_bridge_mongodb, [
|
||||
{description, "EMQX Enterprise MongoDB Bridge"},
|
||||
{vsn, "0.2.0"},
|
||||
{vsn, "0.2.1"},
|
||||
{registered, []},
|
||||
{applications, [
|
||||
kernel,
|
||||
|
@ -8,7 +8,6 @@
|
|||
emqx_connector,
|
||||
emqx_resource,
|
||||
emqx_bridge,
|
||||
emqx_ee_bridge,
|
||||
emqx_mongodb
|
||||
]},
|
||||
{env, []},
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
-behaviour(hocon_schema).
|
||||
|
||||
%% emqx_ee_bridge "callbacks"
|
||||
%% emqx_bridge_enterprise "callbacks"
|
||||
-export([
|
||||
conn_bridge_examples/1
|
||||
]).
|
||||
|
|
|
@ -58,7 +58,7 @@ on_query(InstanceId, {send_message, Message0}, State) ->
|
|||
},
|
||||
Message = render_message(PayloadTemplate, Message0),
|
||||
Res = emqx_mongodb:on_query(InstanceId, {send_message, Message}, NewConnectorState),
|
||||
?tp(mongo_ee_connector_on_query_return, #{result => Res}),
|
||||
?tp(mongo_bridge_connector_on_query_return, #{result => Res}),
|
||||
Res;
|
||||
on_query(InstanceId, Request, _State = #{connector_state := ConnectorState}) ->
|
||||
emqx_mongodb:on_query(InstanceId, Request, ConnectorState).
|
||||
|
|
|
@ -116,7 +116,7 @@ init_per_suite(Config) ->
|
|||
|
||||
end_per_suite(_Config) ->
|
||||
emqx_mgmt_api_test_util:end_suite(),
|
||||
ok = emqx_common_test_helpers:stop_apps([emqx_bridge, emqx_conf, emqx_rule_engine]),
|
||||
ok = emqx_common_test_helpers:stop_apps([emqx_mongodb, emqx_bridge, emqx_rule_engine, emqx_conf]),
|
||||
ok.
|
||||
|
||||
init_per_testcase(_Testcase, Config) ->
|
||||
|
@ -146,9 +146,8 @@ start_apps() ->
|
|||
]).
|
||||
|
||||
ensure_loaded() ->
|
||||
_ = application:load(emqx_ee_bridge),
|
||||
_ = application:load(emqtt),
|
||||
_ = emqx_ee_bridge:module_info(),
|
||||
_ = emqx_bridge_enterprise:module_info(),
|
||||
ok.
|
||||
|
||||
mongo_type(Config) ->
|
||||
|
@ -354,7 +353,7 @@ t_setup_via_config_and_publish(Config) ->
|
|||
{ok, {ok, _}} =
|
||||
?wait_async_action(
|
||||
send_message(Config, #{key => Val}),
|
||||
#{?snk_kind := mongo_ee_connector_on_query_return},
|
||||
#{?snk_kind := mongo_bridge_connector_on_query_return},
|
||||
5_000
|
||||
),
|
||||
?assertMatch(
|
||||
|
@ -379,7 +378,7 @@ t_setup_via_http_api_and_publish(Config) ->
|
|||
{ok, {ok, _}} =
|
||||
?wait_async_action(
|
||||
send_message(Config, #{key => Val}),
|
||||
#{?snk_kind := mongo_ee_connector_on_query_return},
|
||||
#{?snk_kind := mongo_bridge_connector_on_query_return},
|
||||
5_000
|
||||
),
|
||||
?assertMatch(
|
||||
|
@ -395,7 +394,7 @@ t_payload_template(Config) ->
|
|||
{ok, {ok, _}} =
|
||||
?wait_async_action(
|
||||
send_message(Config, #{key => Val, clientid => ClientId}),
|
||||
#{?snk_kind := mongo_ee_connector_on_query_return},
|
||||
#{?snk_kind := mongo_bridge_connector_on_query_return},
|
||||
5_000
|
||||
),
|
||||
?assertMatch(
|
||||
|
@ -421,7 +420,7 @@ t_collection_template(Config) ->
|
|||
clientid => ClientId,
|
||||
mycollectionvar => <<"mycol">>
|
||||
}),
|
||||
#{?snk_kind := mongo_ee_connector_on_query_return},
|
||||
#{?snk_kind := mongo_bridge_connector_on_query_return},
|
||||
5_000
|
||||
),
|
||||
?assertMatch(
|
||||
|
|
|
@ -1,8 +1,15 @@
|
|||
{application, emqx_bridge_mysql, [
|
||||
{description, "EMQX Enterprise MySQL Bridge"},
|
||||
{vsn, "0.1.1"},
|
||||
{vsn, "0.1.2"},
|
||||
{registered, []},
|
||||
{applications, [kernel, stdlib, emqx_connector, emqx_resource, emqx_bridge, emqx_mysql]},
|
||||
{applications, [
|
||||
kernel,
|
||||
stdlib,
|
||||
emqx_connector,
|
||||
emqx_resource,
|
||||
emqx_bridge,
|
||||
emqx_mysql
|
||||
]},
|
||||
{env, []},
|
||||
{modules, []},
|
||||
{links, []}
|
||||
|
|
|
@ -142,10 +142,9 @@ common_init(Config0) ->
|
|||
ProxyHost = os:getenv("PROXY_HOST", "toxiproxy"),
|
||||
ProxyPort = list_to_integer(os:getenv("PROXY_PORT", "8474")),
|
||||
emqx_common_test_helpers:reset_proxy(ProxyHost, ProxyPort),
|
||||
% Ensure EE bridge module is loaded
|
||||
_ = application:load(emqx_ee_bridge),
|
||||
_ = emqx_ee_bridge:module_info(),
|
||||
% Ensure enterprise bridge module is loaded
|
||||
ok = emqx_common_test_helpers:start_apps([emqx_conf, emqx_bridge, emqx_rule_engine]),
|
||||
_ = emqx_bridge_enterprise:module_info(),
|
||||
emqx_mgmt_api_test_util:init_suite(),
|
||||
% Connect to mysql directly and create the table
|
||||
connect_and_create_table(Config0),
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
{application, emqx_bridge_opents, [
|
||||
{description, "EMQX Enterprise OpenTSDB Bridge"},
|
||||
{vsn, "0.1.1"},
|
||||
{vsn, "0.1.2"},
|
||||
{registered, []},
|
||||
{applications, [
|
||||
kernel,
|
||||
stdlib,
|
||||
emqx_resource,
|
||||
emqx_bridge,
|
||||
opentsdb
|
||||
]},
|
||||
{env, []},
|
||||
|
|
|
@ -53,7 +53,7 @@ init_per_suite(Config) ->
|
|||
|
||||
end_per_suite(_Config) ->
|
||||
emqx_mgmt_api_test_util:end_suite(),
|
||||
ok = emqx_common_test_helpers:stop_apps([emqx_bridge, emqx_conf]),
|
||||
ok = emqx_common_test_helpers:stop_apps([opentsdb, emqx_bridge, emqx_resource, emqx_conf]),
|
||||
ok.
|
||||
|
||||
init_per_testcase(_Testcase, Config) ->
|
||||
|
@ -91,10 +91,12 @@ common_init(ConfigT) ->
|
|||
ProxyHost = os:getenv("PROXY_HOST", "toxiproxy"),
|
||||
ProxyPort = list_to_integer(os:getenv("PROXY_PORT", "8474")),
|
||||
emqx_common_test_helpers:reset_proxy(ProxyHost, ProxyPort),
|
||||
% Ensure EE bridge module is loaded
|
||||
_ = application:load(emqx_ee_bridge),
|
||||
_ = emqx_ee_bridge:module_info(),
|
||||
ok = emqx_common_test_helpers:start_apps([emqx_conf, emqx_bridge]),
|
||||
% Ensure enterprise bridge module is loaded
|
||||
ok = emqx_common_test_helpers:start_apps([
|
||||
emqx_conf, emqx_resource, emqx_bridge
|
||||
]),
|
||||
_ = application:ensure_all_started(opentsdb),
|
||||
_ = emqx_bridge_enterprise:module_info(),
|
||||
emqx_mgmt_api_test_util:init_suite(),
|
||||
{Name, OpenTSConf} = opents_config(BridgeType, Config0),
|
||||
Config =
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
{application, emqx_bridge_oracle, [
|
||||
{description, "EMQX Enterprise Oracle Database Bridge"},
|
||||
{vsn, "0.1.2"},
|
||||
{vsn, "0.1.3"},
|
||||
{registered, []},
|
||||
{applications, [
|
||||
kernel,
|
||||
stdlib,
|
||||
emqx_resource,
|
||||
emqx_bridge,
|
||||
emqx_oracle
|
||||
]},
|
||||
{env, []},
|
||||
|
|
|
@ -83,8 +83,9 @@ common_init_per_group() ->
|
|||
ProxyHost = os:getenv("PROXY_HOST", "toxiproxy"),
|
||||
ProxyPort = list_to_integer(os:getenv("PROXY_PORT", "8474")),
|
||||
emqx_common_test_helpers:reset_proxy(ProxyHost, ProxyPort),
|
||||
application:load(emqx_bridge),
|
||||
ok = emqx_common_test_helpers:start_apps([emqx_conf]),
|
||||
%% Ensure enterprise bridge module is loaded
|
||||
ok = emqx_common_test_helpers:start_apps([emqx_conf, emqx_bridge]),
|
||||
_ = emqx_bridge_enterprise:module_info(),
|
||||
ok = emqx_connector_test_helpers:start_apps(?APPS),
|
||||
{ok, _} = application:ensure_all_started(emqx_connector),
|
||||
emqx_mgmt_api_test_util:init_suite(),
|
||||
|
|
|
@ -1,8 +1,13 @@
|
|||
{application, emqx_bridge_pgsql, [
|
||||
{description, "EMQX Enterprise PostgreSQL Bridge"},
|
||||
{vsn, "0.1.2"},
|
||||
{vsn, "0.1.3"},
|
||||
{registered, []},
|
||||
{applications, [kernel, stdlib]},
|
||||
{applications, [
|
||||
kernel,
|
||||
stdlib,
|
||||
emqx_resource,
|
||||
emqx_bridge
|
||||
]},
|
||||
{env, []},
|
||||
{modules, []},
|
||||
{links, []}
|
||||
|
|
|
@ -145,10 +145,9 @@ common_init(Config0) ->
|
|||
ProxyHost = os:getenv("PROXY_HOST", "toxiproxy"),
|
||||
ProxyPort = list_to_integer(os:getenv("PROXY_PORT", "8474")),
|
||||
emqx_common_test_helpers:reset_proxy(ProxyHost, ProxyPort),
|
||||
% Ensure EE bridge module is loaded
|
||||
_ = application:load(emqx_ee_bridge),
|
||||
_ = emqx_ee_bridge:module_info(),
|
||||
% Ensure enterprise bridge module is loaded
|
||||
ok = emqx_common_test_helpers:start_apps([emqx_conf, emqx_bridge]),
|
||||
_ = emqx_bridge_enterprise:module_info(),
|
||||
emqx_mgmt_api_test_util:init_suite(),
|
||||
% Connect to pgsql directly and create the table
|
||||
connect_and_create_table(Config0),
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
{application, emqx_bridge_pulsar, [
|
||||
{description, "EMQX Pulsar Bridge"},
|
||||
{vsn, "0.1.4"},
|
||||
{vsn, "0.1.5"},
|
||||
{registered, []},
|
||||
{applications, [
|
||||
kernel,
|
||||
stdlib,
|
||||
emqx_resource,
|
||||
emqx_bridge,
|
||||
pulsar
|
||||
]},
|
||||
{env, []},
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
fields/1,
|
||||
desc/1
|
||||
]).
|
||||
%% emqx_ee_bridge "unofficial" API
|
||||
%% emqx_bridge_enterprise "unofficial" API
|
||||
-export([conn_bridge_examples/1]).
|
||||
|
||||
-export([producer_strategy_key_validator/1]).
|
||||
|
|
|
@ -122,8 +122,10 @@ common_init_per_group() ->
|
|||
ProxyHost = os:getenv("PROXY_HOST", "toxiproxy"),
|
||||
ProxyPort = list_to_integer(os:getenv("PROXY_PORT", "8474")),
|
||||
emqx_common_test_helpers:reset_proxy(ProxyHost, ProxyPort),
|
||||
application:load(emqx_bridge),
|
||||
ok = emqx_common_test_helpers:start_apps([emqx_conf]),
|
||||
%% Ensure enterprise bridge module is loaded
|
||||
ok = emqx_common_test_helpers:start_apps([emqx_conf, emqx_resource, emqx_bridge]),
|
||||
_ = application:ensure_all_started(pulsar),
|
||||
_ = emqx_bridge_enterprise:module_info(),
|
||||
ok = emqx_connector_test_helpers:start_apps(?APPS),
|
||||
{ok, _} = application:ensure_all_started(emqx_connector),
|
||||
emqx_mgmt_api_test_util:init_suite(),
|
||||
|
|
|
@ -1,8 +1,16 @@
|
|||
{application, emqx_bridge_rabbitmq, [
|
||||
{description, "EMQX Enterprise RabbitMQ Bridge"},
|
||||
{vsn, "0.1.2"},
|
||||
{vsn, "0.1.3"},
|
||||
{registered, []},
|
||||
{applications, [kernel, stdlib, ecql, rabbit_common, amqp_client]},
|
||||
{applications, [
|
||||
kernel,
|
||||
stdlib,
|
||||
emqx_resource,
|
||||
emqx_bridge,
|
||||
ecql,
|
||||
rabbit_common,
|
||||
amqp_client
|
||||
]},
|
||||
{env, []},
|
||||
{modules, []},
|
||||
{links, []}
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
-include_lib("amqp_client/include/amqp_client.hrl").
|
||||
|
||||
%% See comment in
|
||||
%% lib-ee/emqx_ee_connector/test/ee_connector_rabbitmq_SUITE.erl for how to
|
||||
%% apps/emqx_bridge_rabbitmq/test/emqx_bridge_rabbitmq_connector_SUITE.erl for how to
|
||||
%% run this without bringing up the whole CI infrastucture
|
||||
|
||||
rabbit_mq_host() ->
|
||||
|
@ -50,8 +50,6 @@ init_per_suite(Config) ->
|
|||
ok = emqx_common_test_helpers:start_apps([emqx_conf, emqx_bridge]),
|
||||
ok = emqx_connector_test_helpers:start_apps([emqx_resource]),
|
||||
{ok, _} = application:ensure_all_started(emqx_connector),
|
||||
{ok, _} = application:ensure_all_started(emqx_ee_connector),
|
||||
{ok, _} = application:ensure_all_started(emqx_ee_bridge),
|
||||
{ok, _} = application:ensure_all_started(amqp_client),
|
||||
emqx_mgmt_api_test_util:init_suite(),
|
||||
ChannelConnection = setup_rabbit_mq_exchange_and_queue(),
|
||||
|
@ -112,7 +110,6 @@ end_per_suite(Config) ->
|
|||
ok = emqx_common_test_helpers:stop_apps([emqx_conf]),
|
||||
ok = emqx_connector_test_helpers:stop_apps([emqx_resource]),
|
||||
_ = application:stop(emqx_connector),
|
||||
_ = application:stop(emqx_ee_connector),
|
||||
_ = application:stop(emqx_bridge),
|
||||
%% Close the channel
|
||||
ok = amqp_channel:close(Channel),
|
||||
|
|
|
@ -48,7 +48,6 @@ init_per_suite(Config) ->
|
|||
ok = emqx_common_test_helpers:start_apps([emqx_conf]),
|
||||
ok = emqx_connector_test_helpers:start_apps([emqx_resource]),
|
||||
{ok, _} = application:ensure_all_started(emqx_connector),
|
||||
{ok, _} = application:ensure_all_started(emqx_ee_connector),
|
||||
{ok, _} = application:ensure_all_started(amqp_client),
|
||||
ChannelConnection = setup_rabbit_mq_exchange_and_queue(),
|
||||
[{channel_connection, ChannelConnection} | Config];
|
||||
|
|
|
@ -1,8 +1,15 @@
|
|||
{application, emqx_bridge_redis, [
|
||||
{description, "EMQX Enterprise Redis Bridge"},
|
||||
{vsn, "0.1.1"},
|
||||
{vsn, "0.1.2"},
|
||||
{registered, []},
|
||||
{applications, [kernel, stdlib, emqx_connector, emqx_resource, emqx_bridge, emqx_redis]},
|
||||
{applications, [
|
||||
kernel,
|
||||
stdlib,
|
||||
emqx_connector,
|
||||
emqx_resource,
|
||||
emqx_bridge,
|
||||
emqx_redis
|
||||
]},
|
||||
{env, []},
|
||||
{modules, []},
|
||||
{links, []}
|
||||
|
|
|
@ -28,7 +28,7 @@ on_start(InstId, #{command_template := CommandTemplate} = Config) ->
|
|||
case emqx_redis:on_start(InstId, Config) of
|
||||
{ok, RedisConnSt} ->
|
||||
?tp(
|
||||
redis_ee_connector_start_success,
|
||||
redis_bridge_connector_start_success,
|
||||
#{}
|
||||
),
|
||||
{ok, #{
|
||||
|
@ -37,7 +37,7 @@ on_start(InstId, #{command_template := CommandTemplate} = Config) ->
|
|||
}};
|
||||
{error, _} = Error ->
|
||||
?tp(
|
||||
redis_ee_connector_start_error,
|
||||
redis_bridge_connector_start_error,
|
||||
#{error => Error}
|
||||
),
|
||||
Error
|
||||
|
@ -60,12 +60,12 @@ on_query(
|
|||
) ->
|
||||
Cmd = proc_command_template(CommandTemplate, Data),
|
||||
?tp(
|
||||
redis_ee_connector_cmd,
|
||||
redis_bridge_connector_cmd,
|
||||
#{cmd => Cmd, batch => false, mode => sync}
|
||||
),
|
||||
Result = query(InstId, {cmd, Cmd}, RedisConnSt),
|
||||
?tp(
|
||||
redis_ee_connector_send_done,
|
||||
redis_bridge_connector_send_done,
|
||||
#{cmd => Cmd, batch => false, mode => sync, result => Result}
|
||||
),
|
||||
Result;
|
||||
|
@ -75,12 +75,12 @@ on_query(
|
|||
_State = #{conn_st := RedisConnSt}
|
||||
) ->
|
||||
?tp(
|
||||
redis_ee_connector_query,
|
||||
redis_bridge_connector_query,
|
||||
#{query => Query, batch => false, mode => sync}
|
||||
),
|
||||
Result = query(InstId, Query, RedisConnSt),
|
||||
?tp(
|
||||
redis_ee_connector_send_done,
|
||||
redis_bridge_connector_send_done,
|
||||
#{query => Query, batch => false, mode => sync, result => Result}
|
||||
),
|
||||
Result.
|
||||
|
@ -90,12 +90,12 @@ on_batch_query(
|
|||
) ->
|
||||
Cmds = process_batch_data(BatchData, CommandTemplate),
|
||||
?tp(
|
||||
redis_ee_connector_send,
|
||||
redis_bridge_connector_send,
|
||||
#{batch_data => BatchData, batch => true, mode => sync}
|
||||
),
|
||||
Result = query(InstId, {cmds, Cmds}, RedisConnSt),
|
||||
?tp(
|
||||
redis_ee_connector_send_done,
|
||||
redis_bridge_connector_send_done,
|
||||
#{
|
||||
batch_data => BatchData,
|
||||
batch_size => length(BatchData),
|
||||
|
|
|
@ -117,11 +117,9 @@ wait_for_ci_redis(Checks, Config) ->
|
|||
ProxyHost = os:getenv("PROXY_HOST", ?PROXY_HOST),
|
||||
ProxyPort = list_to_integer(os:getenv("PROXY_PORT", ?PROXY_PORT)),
|
||||
emqx_common_test_helpers:reset_proxy(ProxyHost, ProxyPort),
|
||||
ok = emqx_common_test_helpers:start_apps([emqx_conf]),
|
||||
ok = emqx_connector_test_helpers:start_apps([
|
||||
emqx_resource, emqx_bridge, emqx_rule_engine
|
||||
ok = emqx_common_test_helpers:start_apps([
|
||||
emqx_conf, emqx_resource, emqx_connector, emqx_bridge, emqx_rule_engine
|
||||
]),
|
||||
{ok, _} = application:ensure_all_started(emqx_connector),
|
||||
[
|
||||
{proxy_host, ProxyHost},
|
||||
{proxy_port, ProxyPort}
|
||||
|
@ -271,21 +269,21 @@ t_check_replay(Config) ->
|
|||
lists:seq(1, ?BATCH_SIZE)
|
||||
),
|
||||
#{
|
||||
?snk_kind := redis_ee_connector_send_done,
|
||||
?snk_kind := redis_bridge_connector_send_done,
|
||||
batch := true,
|
||||
result := {error, _}
|
||||
},
|
||||
10_000
|
||||
)
|
||||
end),
|
||||
#{?snk_kind := redis_ee_connector_send_done, batch := true, result := {ok, _}},
|
||||
#{?snk_kind := redis_bridge_connector_send_done, batch := true, result := {ok, _}},
|
||||
10_000
|
||||
),
|
||||
fun(Trace) ->
|
||||
?assert(
|
||||
?strict_causality(
|
||||
#{?snk_kind := redis_ee_connector_send_done, result := {error, _}},
|
||||
#{?snk_kind := redis_ee_connector_send_done, result := {ok, _}},
|
||||
#{?snk_kind := redis_bridge_connector_send_done, result := {error, _}},
|
||||
#{?snk_kind := redis_bridge_connector_send_done, result := {ok, _}},
|
||||
Trace
|
||||
)
|
||||
)
|
||||
|
@ -308,14 +306,14 @@ t_permanent_error(_Config) ->
|
|||
begin
|
||||
?wait_async_action(
|
||||
publish_message(Topic, Payload),
|
||||
#{?snk_kind := redis_ee_connector_send_done},
|
||||
#{?snk_kind := redis_bridge_connector_send_done},
|
||||
10_000
|
||||
)
|
||||
end,
|
||||
fun(Trace) ->
|
||||
?assertMatch(
|
||||
[#{result := {error, _}} | _],
|
||||
?of_kind(redis_ee_connector_send_done, Trace)
|
||||
?of_kind(redis_bridge_connector_send_done, Trace)
|
||||
)
|
||||
end
|
||||
),
|
||||
|
@ -334,7 +332,7 @@ t_create_disconnected(Config) ->
|
|||
fun(Trace) ->
|
||||
?assertMatch(
|
||||
[#{error := _} | _],
|
||||
?of_kind(redis_ee_connector_start_error, Trace)
|
||||
?of_kind(redis_bridge_connector_start_error, Trace)
|
||||
),
|
||||
ok
|
||||
end
|
||||
|
@ -365,7 +363,7 @@ check_resource_queries(ResourceId, BaseTopic, IsBatch) ->
|
|||
end,
|
||||
lists:seq(1, N)
|
||||
),
|
||||
#{?snk_kind := redis_ee_connector_send_done, batch := IsBatch},
|
||||
#{?snk_kind := redis_bridge_connector_send_done, batch := IsBatch},
|
||||
5000
|
||||
),
|
||||
fun(Trace) ->
|
||||
|
@ -374,13 +372,13 @@ check_resource_queries(ResourceId, BaseTopic, IsBatch) ->
|
|||
true ->
|
||||
?assertMatch(
|
||||
[#{result := {ok, _}, batch := true, batch_size := ?BATCH_SIZE} | _],
|
||||
?of_kind(redis_ee_connector_send_done, Trace)
|
||||
?of_kind(redis_bridge_connector_send_done, Trace)
|
||||
),
|
||||
?assertEqual(?BATCH_SIZE, AddedMsgCount);
|
||||
false ->
|
||||
?assertMatch(
|
||||
[#{result := {ok, _}, batch := false} | _],
|
||||
?of_kind(redis_ee_connector_send_done, Trace)
|
||||
?of_kind(redis_bridge_connector_send_done, Trace)
|
||||
),
|
||||
?assertEqual(1, AddedMsgCount)
|
||||
end
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
{application, emqx_bridge_rocketmq, [
|
||||
{description, "EMQX Enterprise RocketMQ Bridge"},
|
||||
{vsn, "0.1.2"},
|
||||
{vsn, "0.1.3"},
|
||||
{registered, []},
|
||||
{applications, [kernel, stdlib, rocketmq]},
|
||||
{applications, [kernel, stdlib, emqx_resource, emqx_bridge, rocketmq]},
|
||||
{env, []},
|
||||
{modules, []},
|
||||
{links, []}
|
||||
|
|
|
@ -109,10 +109,11 @@ common_init(ConfigT) ->
|
|||
ProxyHost = os:getenv("PROXY_HOST", "toxiproxy"),
|
||||
ProxyPort = list_to_integer(os:getenv("PROXY_PORT", "8474")),
|
||||
emqx_common_test_helpers:reset_proxy(ProxyHost, ProxyPort),
|
||||
% Ensure EE bridge module is loaded
|
||||
_ = application:load(emqx_ee_bridge),
|
||||
_ = emqx_ee_bridge:module_info(),
|
||||
ok = emqx_common_test_helpers:start_apps([emqx_conf, emqx_bridge]),
|
||||
% Ensure enterprise bridge module is loaded
|
||||
ok = emqx_common_test_helpers:start_apps([
|
||||
emqx_conf, emqx_resource, emqx_bridge, rocketmq
|
||||
]),
|
||||
_ = emqx_bridge_enterprise:module_info(),
|
||||
emqx_mgmt_api_test_util:init_suite(),
|
||||
{Name, RocketMQConf} = rocketmq_config(BridgeType, Config0),
|
||||
Config =
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
{application, emqx_bridge_sqlserver, [
|
||||
{description, "EMQX Enterprise SQL Server Bridge"},
|
||||
{vsn, "0.1.1"},
|
||||
{vsn, "0.1.2"},
|
||||
{registered, []},
|
||||
{applications, [kernel, stdlib, odbc]},
|
||||
{applications, [kernel, stdlib, emqx_resource, emqx_bridge, odbc]},
|
||||
{env, []},
|
||||
{modules, []},
|
||||
{links, []}
|
||||
|
|
|
@ -416,10 +416,9 @@ common_init(ConfigT) ->
|
|||
ProxyHost = os:getenv("PROXY_HOST", "toxiproxy"),
|
||||
ProxyPort = list_to_integer(os:getenv("PROXY_PORT", "8474")),
|
||||
emqx_common_test_helpers:reset_proxy(ProxyHost, ProxyPort),
|
||||
% Ensure EE bridge module is loaded
|
||||
_ = application:load(emqx_ee_bridge),
|
||||
_ = emqx_ee_bridge:module_info(),
|
||||
ok = emqx_common_test_helpers:start_apps([emqx_conf, emqx_bridge]),
|
||||
% Ensure enterprise bridge module is loaded
|
||||
ok = emqx_common_test_helpers:start_apps([emqx_conf, emqx_bridge, odbc]),
|
||||
_ = emqx_bridge_enterprise:module_info(),
|
||||
emqx_mgmt_api_test_util:init_suite(),
|
||||
% Connect to sqlserver directly
|
||||
% drop old db and table, and then create new ones
|
||||
|
|
|
@ -1,8 +1,14 @@
|
|||
{application, emqx_bridge_tdengine, [
|
||||
{description, "EMQX Enterprise TDEngine Bridge"},
|
||||
{vsn, "0.1.3"},
|
||||
{vsn, "0.1.4"},
|
||||
{registered, []},
|
||||
{applications, [kernel, stdlib, tdengine]},
|
||||
{applications, [
|
||||
kernel,
|
||||
stdlib,
|
||||
emqx_resource,
|
||||
emqx_bridge,
|
||||
tdengine
|
||||
]},
|
||||
{env, []},
|
||||
{modules, []},
|
||||
{links, []}
|
||||
|
|
|
@ -142,10 +142,9 @@ common_init(ConfigT) ->
|
|||
ProxyHost = os:getenv("PROXY_HOST", "toxiproxy"),
|
||||
ProxyPort = list_to_integer(os:getenv("PROXY_PORT", "8474")),
|
||||
emqx_common_test_helpers:reset_proxy(ProxyHost, ProxyPort),
|
||||
% Ensure EE bridge module is loaded
|
||||
_ = application:load(emqx_ee_bridge),
|
||||
_ = emqx_ee_bridge:module_info(),
|
||||
ok = emqx_common_test_helpers:start_apps([emqx_conf, emqx_bridge]),
|
||||
% Ensure enterprise bridge module is loaded
|
||||
ok = emqx_common_test_helpers:start_apps([emqx_conf, emqx_bridge, tdengine]),
|
||||
_ = emqx_bridge_enterprise:module_info(),
|
||||
emqx_mgmt_api_test_util:init_suite(),
|
||||
% Connect to tdengine directly and create the table
|
||||
connect_and_create_table(Config0),
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
{application, emqx_bridge_timescale, [
|
||||
{description, "EMQX Enterprise TimescaleDB Bridge"},
|
||||
{vsn, "0.1.1"},
|
||||
{vsn, "0.1.2"},
|
||||
{registered, []},
|
||||
{applications, [kernel, stdlib]},
|
||||
{applications, [kernel, stdlib, emqx_resource, emqx_bridge]},
|
||||
{env, []},
|
||||
{modules, []},
|
||||
{links, []}
|
||||
|
|
|
@ -1,19 +0,0 @@
|
|||
.rebar3
|
||||
_*
|
||||
.eunit
|
||||
*.o
|
||||
*.beam
|
||||
*.plt
|
||||
*.swp
|
||||
*.swo
|
||||
.erlang.cookie
|
||||
ebin
|
||||
log
|
||||
erl_crash.dump
|
||||
.rebar
|
||||
logs
|
||||
_build
|
||||
.idea
|
||||
*.iml
|
||||
rebar3.crashdump
|
||||
*~
|
|
@ -1,9 +0,0 @@
|
|||
emqx_ee_bridge
|
||||
=====
|
||||
|
||||
An OTP application
|
||||
|
||||
Build
|
||||
-----
|
||||
|
||||
$ rebar3 compile
|
|
@ -1 +0,0 @@
|
|||
toxiproxy
|
|
@ -1,11 +0,0 @@
|
|||
%% -*- mode: erlang; -*-
|
||||
{erl_opts, [debug_info]}.
|
||||
{deps, [ {emqx_connector, {path, "../../apps/emqx_connector"}}
|
||||
, {emqx_resource, {path, "../../apps/emqx_resource"}}
|
||||
, {emqx_bridge, {path, "../../apps/emqx_bridge"}}
|
||||
, {emqx_utils, {path, "../emqx_utils"}}
|
||||
]}.
|
||||
|
||||
{shell, [
|
||||
{apps, [emqx_ee_bridge]}
|
||||
]}.
|
|
@ -1,27 +0,0 @@
|
|||
{application, emqx_ee_bridge, [
|
||||
{description, "EMQX Enterprise data bridges"},
|
||||
{vsn, "0.1.16"},
|
||||
{registered, []},
|
||||
{applications, [
|
||||
kernel,
|
||||
stdlib,
|
||||
emqx_ee_connector,
|
||||
telemetry,
|
||||
emqx_bridge_kafka,
|
||||
emqx_bridge_gcp_pubsub,
|
||||
emqx_bridge_cassandra,
|
||||
emqx_bridge_opents,
|
||||
emqx_bridge_pulsar,
|
||||
emqx_bridge_dynamo,
|
||||
emqx_bridge_sqlserver,
|
||||
emqx_bridge_rocketmq,
|
||||
emqx_bridge_rabbitmq,
|
||||
emqx_bridge_tdengine,
|
||||
emqx_bridge_influxdb,
|
||||
emqx_bridge_clickhouse
|
||||
]},
|
||||
{env, []},
|
||||
{modules, []},
|
||||
|
||||
{links, []}
|
||||
]}.
|
|
@ -1,19 +0,0 @@
|
|||
.rebar3
|
||||
_*
|
||||
.eunit
|
||||
*.o
|
||||
*.beam
|
||||
*.plt
|
||||
*.swp
|
||||
*.swo
|
||||
.erlang.cookie
|
||||
ebin
|
||||
log
|
||||
erl_crash.dump
|
||||
.rebar
|
||||
logs
|
||||
_build
|
||||
.idea
|
||||
*.iml
|
||||
rebar3.crashdump
|
||||
*~
|
|
@ -1,9 +0,0 @@
|
|||
emqx_ee_connector
|
||||
=====
|
||||
|
||||
An OTP application
|
||||
|
||||
Build
|
||||
-----
|
||||
|
||||
$ rebar3 compile
|
|
@ -1,2 +0,0 @@
|
|||
toxiproxy
|
||||
influxdb
|
|
@ -1,10 +0,0 @@
|
|||
%% -*- mode: erlang -*-
|
||||
{erl_opts, [debug_info]}.
|
||||
{deps, [
|
||||
{emqx, {path, "../../apps/emqx"}},
|
||||
{emqx_utils, {path, "../../apps/emqx_utils"}}
|
||||
]}.
|
||||
|
||||
{shell, [
|
||||
{apps, [emqx_ee_connector]}
|
||||
]}.
|
|
@ -1,16 +0,0 @@
|
|||
{application, emqx_ee_connector, [
|
||||
{description, "EMQX Enterprise connectors"},
|
||||
{vsn, "0.1.15"},
|
||||
{registered, []},
|
||||
{applications, [
|
||||
kernel,
|
||||
stdlib,
|
||||
ecpool,
|
||||
hstreamdb_erl,
|
||||
emqx_redis
|
||||
]},
|
||||
{env, []},
|
||||
{modules, []},
|
||||
|
||||
{links, []}
|
||||
]}.
|
2
mix.exs
2
mix.exs
|
@ -395,8 +395,6 @@ defmodule EMQXUmbrella.MixProject do
|
|||
do: [
|
||||
emqx_license: :permanent,
|
||||
emqx_enterprise: :load,
|
||||
emqx_ee_connector: :permanent,
|
||||
emqx_ee_bridge: :permanent,
|
||||
emqx_bridge_kafka: :permanent,
|
||||
emqx_bridge_pulsar: :permanent,
|
||||
emqx_bridge_gcp_pubsub: :permanent,
|
||||
|
|
|
@ -463,8 +463,6 @@ relx_apps_per_edition(ee) ->
|
|||
[
|
||||
emqx_license,
|
||||
{emqx_enterprise, load},
|
||||
emqx_ee_connector,
|
||||
emqx_ee_bridge,
|
||||
emqx_bridge_kafka,
|
||||
emqx_bridge_pulsar,
|
||||
emqx_bridge_gcp_pubsub,
|
||||
|
|
Loading…
Reference in New Issue