Merge branch 'release-50' into file-transfer
* release-50: fix(limiter): fix an error when setting `max_conn_rate` in a listener chore: bump erlcloud dependencies vsns chore: rename dynamo template files refactor(dynamo): move dynamo bridge into its own app chore: update changes && bump app versions fix: issues with the RabbitMQ config refactor(pgsql): move pgsql && matrix && timescale bridges into their own app fix: the iotdb password field so it has the password format chore: update changes refactor(tdengine): move tdengine bridge into its own app feat: deprecate listeners's authn http api
This commit is contained in:
commit
5b5d7ceac5
|
@ -286,7 +286,8 @@ default_client_config() ->
|
||||||
default_bucket_config() ->
|
default_bucket_config() ->
|
||||||
#{
|
#{
|
||||||
rate => infinity,
|
rate => infinity,
|
||||||
burst => 0
|
burst => 0,
|
||||||
|
initial => 0
|
||||||
}.
|
}.
|
||||||
|
|
||||||
get_listener_opts(Conf) ->
|
get_listener_opts(Conf) ->
|
||||||
|
|
|
@ -347,7 +347,8 @@ do_start_listener(Type, ListenerName, #{bind := ListenOn} = Opts) when
|
||||||
Type == tcp; Type == ssl
|
Type == tcp; Type == ssl
|
||||||
->
|
->
|
||||||
Id = listener_id(Type, ListenerName),
|
Id = listener_id(Type, ListenerName),
|
||||||
add_limiter_bucket(Id, Opts),
|
Limiter = limiter(Opts),
|
||||||
|
add_limiter_bucket(Id, Limiter),
|
||||||
esockd:open(
|
esockd:open(
|
||||||
Id,
|
Id,
|
||||||
ListenOn,
|
ListenOn,
|
||||||
|
@ -356,7 +357,7 @@ do_start_listener(Type, ListenerName, #{bind := ListenOn} = Opts) when
|
||||||
#{
|
#{
|
||||||
listener => {Type, ListenerName},
|
listener => {Type, ListenerName},
|
||||||
zone => zone(Opts),
|
zone => zone(Opts),
|
||||||
limiter => limiter(Opts),
|
limiter => Limiter,
|
||||||
enable_authn => enable_authn(Opts)
|
enable_authn => enable_authn(Opts)
|
||||||
}
|
}
|
||||||
]}
|
]}
|
||||||
|
@ -366,9 +367,10 @@ do_start_listener(Type, ListenerName, #{bind := ListenOn} = Opts) when
|
||||||
Type == ws; Type == wss
|
Type == ws; Type == wss
|
||||||
->
|
->
|
||||||
Id = listener_id(Type, ListenerName),
|
Id = listener_id(Type, ListenerName),
|
||||||
add_limiter_bucket(Id, Opts),
|
Limiter = limiter(Opts),
|
||||||
|
add_limiter_bucket(Id, Limiter),
|
||||||
RanchOpts = ranch_opts(Type, ListenOn, Opts),
|
RanchOpts = ranch_opts(Type, ListenOn, Opts),
|
||||||
WsOpts = ws_opts(Type, ListenerName, Opts),
|
WsOpts = ws_opts(Type, ListenerName, Opts, Limiter),
|
||||||
case Type of
|
case Type of
|
||||||
ws -> cowboy:start_clear(Id, RanchOpts, WsOpts);
|
ws -> cowboy:start_clear(Id, RanchOpts, WsOpts);
|
||||||
wss -> cowboy:start_tls(Id, RanchOpts, WsOpts)
|
wss -> cowboy:start_tls(Id, RanchOpts, WsOpts)
|
||||||
|
@ -415,20 +417,22 @@ do_start_listener(quic, ListenerName, #{bind := Bind} = Opts) ->
|
||||||
Password -> [{password, str(Password)}]
|
Password -> [{password, str(Password)}]
|
||||||
end ++
|
end ++
|
||||||
optional_quic_listener_opts(Opts),
|
optional_quic_listener_opts(Opts),
|
||||||
|
Limiter = limiter(Opts),
|
||||||
ConnectionOpts = #{
|
ConnectionOpts = #{
|
||||||
conn_callback => emqx_quic_connection,
|
conn_callback => emqx_quic_connection,
|
||||||
peer_unidi_stream_count => maps:get(peer_unidi_stream_count, Opts, 1),
|
peer_unidi_stream_count => maps:get(peer_unidi_stream_count, Opts, 1),
|
||||||
peer_bidi_stream_count => maps:get(peer_bidi_stream_count, Opts, 10),
|
peer_bidi_stream_count => maps:get(peer_bidi_stream_count, Opts, 10),
|
||||||
zone => zone(Opts),
|
zone => zone(Opts),
|
||||||
listener => {quic, ListenerName},
|
listener => {quic, ListenerName},
|
||||||
limiter => limiter(Opts)
|
limiter => Limiter
|
||||||
},
|
},
|
||||||
StreamOpts = #{
|
StreamOpts = #{
|
||||||
stream_callback => emqx_quic_stream,
|
stream_callback => emqx_quic_stream,
|
||||||
active => 1
|
active => 1
|
||||||
},
|
},
|
||||||
|
|
||||||
Id = listener_id(quic, ListenerName),
|
Id = listener_id(quic, ListenerName),
|
||||||
add_limiter_bucket(Id, Opts),
|
add_limiter_bucket(Id, Limiter),
|
||||||
quicer:start_listener(
|
quicer:start_listener(
|
||||||
Id,
|
Id,
|
||||||
ListenOn,
|
ListenOn,
|
||||||
|
@ -532,12 +536,12 @@ esockd_opts(ListenerId, Type, Opts0) ->
|
||||||
end
|
end
|
||||||
).
|
).
|
||||||
|
|
||||||
ws_opts(Type, ListenerName, Opts) ->
|
ws_opts(Type, ListenerName, Opts, Limiter) ->
|
||||||
WsPaths = [
|
WsPaths = [
|
||||||
{emqx_utils_maps:deep_get([websocket, mqtt_path], Opts, "/mqtt"), emqx_ws_connection, #{
|
{emqx_utils_maps:deep_get([websocket, mqtt_path], Opts, "/mqtt"), emqx_ws_connection, #{
|
||||||
zone => zone(Opts),
|
zone => zone(Opts),
|
||||||
listener => {Type, ListenerName},
|
listener => {Type, ListenerName},
|
||||||
limiter => limiter(Opts),
|
limiter => Limiter,
|
||||||
enable_authn => enable_authn(Opts)
|
enable_authn => enable_authn(Opts)
|
||||||
}}
|
}}
|
||||||
],
|
],
|
||||||
|
@ -653,26 +657,29 @@ zone(Opts) ->
|
||||||
limiter(Opts) ->
|
limiter(Opts) ->
|
||||||
emqx_limiter_schema:get_listener_opts(Opts).
|
emqx_limiter_schema:get_listener_opts(Opts).
|
||||||
|
|
||||||
add_limiter_bucket(Id, #{limiter := Limiter}) ->
|
add_limiter_bucket(_Id, undefined) ->
|
||||||
|
ok;
|
||||||
|
add_limiter_bucket(Id, Limiter) ->
|
||||||
maps:fold(
|
maps:fold(
|
||||||
fun(Type, Cfg, _) ->
|
fun(Type, Cfg, _) ->
|
||||||
emqx_limiter_server:add_bucket(Id, Type, Cfg)
|
emqx_limiter_server:add_bucket(Id, Type, Cfg)
|
||||||
end,
|
end,
|
||||||
ok,
|
ok,
|
||||||
maps:without([client], Limiter)
|
maps:without([client], Limiter)
|
||||||
);
|
).
|
||||||
add_limiter_bucket(_Id, _Cfg) ->
|
|
||||||
ok.
|
|
||||||
|
|
||||||
del_limiter_bucket(Id, #{limiter := Limiters}) ->
|
del_limiter_bucket(Id, Conf) ->
|
||||||
|
case limiter(Conf) of
|
||||||
|
undefined ->
|
||||||
|
ok;
|
||||||
|
Limiter ->
|
||||||
lists:foreach(
|
lists:foreach(
|
||||||
fun(Type) ->
|
fun(Type) ->
|
||||||
emqx_limiter_server:del_bucket(Id, Type)
|
emqx_limiter_server:del_bucket(Id, Type)
|
||||||
end,
|
end,
|
||||||
maps:keys(Limiters)
|
maps:keys(Limiter)
|
||||||
);
|
)
|
||||||
del_limiter_bucket(_Id, _Cfg) ->
|
end.
|
||||||
ok.
|
|
||||||
|
|
||||||
enable_authn(Opts) ->
|
enable_authn(Opts) ->
|
||||||
maps:get(enable_authn, Opts, true).
|
maps:get(enable_authn, Opts, true).
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
%% -*- mode: erlang -*-
|
%% -*- mode: erlang -*-
|
||||||
{application, emqx_authn, [
|
{application, emqx_authn, [
|
||||||
{description, "EMQX Authentication"},
|
{description, "EMQX Authentication"},
|
||||||
{vsn, "0.1.18"},
|
{vsn, "0.1.19"},
|
||||||
{modules, []},
|
{modules, []},
|
||||||
{registered, [emqx_authn_sup, emqx_authn_registry]},
|
{registered, [emqx_authn_sup, emqx_authn_registry]},
|
||||||
{applications, [kernel, stdlib, emqx_resource, emqx_connector, ehttpc, epgsql, mysql, jose]},
|
{applications, [kernel, stdlib, emqx_resource, emqx_connector, ehttpc, epgsql, mysql, jose]},
|
||||||
|
|
|
@ -228,6 +228,7 @@ schema("/listeners/:listener_id/authentication") ->
|
||||||
'operationId' => listener_authenticators,
|
'operationId' => listener_authenticators,
|
||||||
get => #{
|
get => #{
|
||||||
tags => ?API_TAGS_SINGLE,
|
tags => ?API_TAGS_SINGLE,
|
||||||
|
deprecated => true,
|
||||||
description => ?DESC(listeners_listener_id_authentication_get),
|
description => ?DESC(listeners_listener_id_authentication_get),
|
||||||
parameters => [param_listener_id()],
|
parameters => [param_listener_id()],
|
||||||
responses => #{
|
responses => #{
|
||||||
|
@ -239,6 +240,7 @@ schema("/listeners/:listener_id/authentication") ->
|
||||||
},
|
},
|
||||||
post => #{
|
post => #{
|
||||||
tags => ?API_TAGS_SINGLE,
|
tags => ?API_TAGS_SINGLE,
|
||||||
|
deprecated => true,
|
||||||
description => ?DESC(listeners_listener_id_authentication_post),
|
description => ?DESC(listeners_listener_id_authentication_post),
|
||||||
parameters => [param_listener_id()],
|
parameters => [param_listener_id()],
|
||||||
'requestBody' => emqx_dashboard_swagger:schema_with_examples(
|
'requestBody' => emqx_dashboard_swagger:schema_with_examples(
|
||||||
|
@ -260,6 +262,7 @@ schema("/listeners/:listener_id/authentication/:id") ->
|
||||||
'operationId' => listener_authenticator,
|
'operationId' => listener_authenticator,
|
||||||
get => #{
|
get => #{
|
||||||
tags => ?API_TAGS_SINGLE,
|
tags => ?API_TAGS_SINGLE,
|
||||||
|
deprecated => true,
|
||||||
description => ?DESC(listeners_listener_id_authentication_id_get),
|
description => ?DESC(listeners_listener_id_authentication_id_get),
|
||||||
parameters => [param_listener_id(), param_auth_id()],
|
parameters => [param_listener_id(), param_auth_id()],
|
||||||
responses => #{
|
responses => #{
|
||||||
|
@ -272,6 +275,7 @@ schema("/listeners/:listener_id/authentication/:id") ->
|
||||||
},
|
},
|
||||||
put => #{
|
put => #{
|
||||||
tags => ?API_TAGS_SINGLE,
|
tags => ?API_TAGS_SINGLE,
|
||||||
|
deprecated => true,
|
||||||
description => ?DESC(listeners_listener_id_authentication_id_put),
|
description => ?DESC(listeners_listener_id_authentication_id_put),
|
||||||
parameters => [param_listener_id(), param_auth_id()],
|
parameters => [param_listener_id(), param_auth_id()],
|
||||||
'requestBody' => emqx_dashboard_swagger:schema_with_examples(
|
'requestBody' => emqx_dashboard_swagger:schema_with_examples(
|
||||||
|
@ -287,6 +291,7 @@ schema("/listeners/:listener_id/authentication/:id") ->
|
||||||
},
|
},
|
||||||
delete => #{
|
delete => #{
|
||||||
tags => ?API_TAGS_SINGLE,
|
tags => ?API_TAGS_SINGLE,
|
||||||
|
deprecated => true,
|
||||||
description => ?DESC(listeners_listener_id_authentication_id_delete),
|
description => ?DESC(listeners_listener_id_authentication_id_delete),
|
||||||
parameters => [param_listener_id(), param_auth_id()],
|
parameters => [param_listener_id(), param_auth_id()],
|
||||||
responses => #{
|
responses => #{
|
||||||
|
@ -300,6 +305,7 @@ schema("/listeners/:listener_id/authentication/:id/status") ->
|
||||||
'operationId' => listener_authenticator_status,
|
'operationId' => listener_authenticator_status,
|
||||||
get => #{
|
get => #{
|
||||||
tags => ?API_TAGS_SINGLE,
|
tags => ?API_TAGS_SINGLE,
|
||||||
|
deprecated => true,
|
||||||
description => ?DESC(listeners_listener_id_authentication_id_status_get),
|
description => ?DESC(listeners_listener_id_authentication_id_status_get),
|
||||||
parameters => [param_listener_id(), param_auth_id()],
|
parameters => [param_listener_id(), param_auth_id()],
|
||||||
responses => #{
|
responses => #{
|
||||||
|
@ -330,6 +336,7 @@ schema("/listeners/:listener_id/authentication/:id/position/:position") ->
|
||||||
'operationId' => listener_authenticator_position,
|
'operationId' => listener_authenticator_position,
|
||||||
put => #{
|
put => #{
|
||||||
tags => ?API_TAGS_SINGLE,
|
tags => ?API_TAGS_SINGLE,
|
||||||
|
deprecated => true,
|
||||||
description => ?DESC(listeners_listener_id_authentication_id_position_put),
|
description => ?DESC(listeners_listener_id_authentication_id_position_put),
|
||||||
parameters => [param_listener_id(), param_auth_id(), param_position()],
|
parameters => [param_listener_id(), param_auth_id(), param_position()],
|
||||||
responses => #{
|
responses => #{
|
||||||
|
@ -393,6 +400,7 @@ schema("/listeners/:listener_id/authentication/:id/users") ->
|
||||||
'operationId' => listener_authenticator_users,
|
'operationId' => listener_authenticator_users,
|
||||||
post => #{
|
post => #{
|
||||||
tags => ?API_TAGS_SINGLE,
|
tags => ?API_TAGS_SINGLE,
|
||||||
|
deprecated => true,
|
||||||
description => ?DESC(listeners_listener_id_authentication_id_users_post),
|
description => ?DESC(listeners_listener_id_authentication_id_users_post),
|
||||||
parameters => [param_auth_id(), param_listener_id()],
|
parameters => [param_auth_id(), param_listener_id()],
|
||||||
'requestBody' => emqx_dashboard_swagger:schema_with_examples(
|
'requestBody' => emqx_dashboard_swagger:schema_with_examples(
|
||||||
|
@ -410,6 +418,7 @@ schema("/listeners/:listener_id/authentication/:id/users") ->
|
||||||
},
|
},
|
||||||
get => #{
|
get => #{
|
||||||
tags => ?API_TAGS_SINGLE,
|
tags => ?API_TAGS_SINGLE,
|
||||||
|
deprecated => true,
|
||||||
description => ?DESC(listeners_listener_id_authentication_id_users_get),
|
description => ?DESC(listeners_listener_id_authentication_id_users_get),
|
||||||
parameters => [
|
parameters => [
|
||||||
param_listener_id(),
|
param_listener_id(),
|
||||||
|
@ -479,6 +488,7 @@ schema("/listeners/:listener_id/authentication/:id/users/:user_id") ->
|
||||||
'operationId' => listener_authenticator_user,
|
'operationId' => listener_authenticator_user,
|
||||||
get => #{
|
get => #{
|
||||||
tags => ?API_TAGS_SINGLE,
|
tags => ?API_TAGS_SINGLE,
|
||||||
|
deprecated => true,
|
||||||
description => ?DESC(listeners_listener_id_authentication_id_users_user_id_get),
|
description => ?DESC(listeners_listener_id_authentication_id_users_user_id_get),
|
||||||
parameters => [param_listener_id(), param_auth_id(), param_user_id()],
|
parameters => [param_listener_id(), param_auth_id(), param_user_id()],
|
||||||
responses => #{
|
responses => #{
|
||||||
|
@ -491,6 +501,7 @@ schema("/listeners/:listener_id/authentication/:id/users/:user_id") ->
|
||||||
},
|
},
|
||||||
put => #{
|
put => #{
|
||||||
tags => ?API_TAGS_SINGLE,
|
tags => ?API_TAGS_SINGLE,
|
||||||
|
deprecated => true,
|
||||||
description => ?DESC(listeners_listener_id_authentication_id_users_user_id_put),
|
description => ?DESC(listeners_listener_id_authentication_id_users_user_id_put),
|
||||||
parameters => [param_listener_id(), param_auth_id(), param_user_id()],
|
parameters => [param_listener_id(), param_auth_id(), param_user_id()],
|
||||||
'requestBody' => emqx_dashboard_swagger:schema_with_example(
|
'requestBody' => emqx_dashboard_swagger:schema_with_example(
|
||||||
|
@ -508,6 +519,7 @@ schema("/listeners/:listener_id/authentication/:id/users/:user_id") ->
|
||||||
},
|
},
|
||||||
delete => #{
|
delete => #{
|
||||||
tags => ?API_TAGS_SINGLE,
|
tags => ?API_TAGS_SINGLE,
|
||||||
|
deprecated => true,
|
||||||
description => ?DESC(listeners_listener_id_authentication_id_users_user_id_delete),
|
description => ?DESC(listeners_listener_id_authentication_id_users_user_id_delete),
|
||||||
parameters => [param_listener_id(), param_auth_id(), param_user_id()],
|
parameters => [param_listener_id(), param_auth_id(), param_user_id()],
|
||||||
responses => #{
|
responses => #{
|
||||||
|
|
|
@ -72,6 +72,7 @@ schema("/listeners/:listener_id/authentication/:id/import_users") ->
|
||||||
'operationId' => listener_authenticator_import_users,
|
'operationId' => listener_authenticator_import_users,
|
||||||
post => #{
|
post => #{
|
||||||
tags => ?API_TAGS_SINGLE,
|
tags => ?API_TAGS_SINGLE,
|
||||||
|
deprecated => true,
|
||||||
description => ?DESC(listeners_listener_id_authentication_id_import_users_post),
|
description => ?DESC(listeners_listener_id_authentication_id_import_users_post),
|
||||||
parameters => [emqx_authn_api:param_listener_id(), emqx_authn_api:param_auth_id()],
|
parameters => [emqx_authn_api:param_listener_id(), emqx_authn_api:param_auth_id()],
|
||||||
'requestBody' => emqx_dashboard_swagger:file_schema(filename),
|
'requestBody' => emqx_dashboard_swagger:file_schema(filename),
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
toxiproxy
|
||||||
|
dynamo
|
|
@ -0,0 +1,11 @@
|
||||||
|
%% -*- mode: erlang; -*-
|
||||||
|
{erl_opts, [debug_info]}.
|
||||||
|
{deps, [ {erlcloud, {git, "https://github.com/emqx/erlcloud.git", {tag, "3.5.16-emqx-1"}}}
|
||||||
|
, {emqx_connector, {path, "../../apps/emqx_connector"}}
|
||||||
|
, {emqx_resource, {path, "../../apps/emqx_resource"}}
|
||||||
|
, {emqx_bridge, {path, "../../apps/emqx_bridge"}}
|
||||||
|
]}.
|
||||||
|
|
||||||
|
{shell, [
|
||||||
|
{apps, [emqx_bridge_dynamo]}
|
||||||
|
]}.
|
|
@ -1,8 +1,8 @@
|
||||||
{application, emqx_bridge_dynamo, [
|
{application, emqx_bridge_dynamo, [
|
||||||
{description, "EMQX Enterprise Dynamo Bridge"},
|
{description, "EMQX Enterprise Dynamo Bridge"},
|
||||||
{vsn, "0.1.0"},
|
{vsn, "0.1.1"},
|
||||||
{registered, []},
|
{registered, []},
|
||||||
{applications, [kernel, stdlib]},
|
{applications, [kernel, stdlib, erlcloud]},
|
||||||
{env, []},
|
{env, []},
|
||||||
{modules, []},
|
{modules, []},
|
||||||
{links, []}
|
{links, []}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
%%--------------------------------------------------------------------
|
%%--------------------------------------------------------------------
|
||||||
%% Copyright (c) 2022 EMQ Technologies Co., Ltd. All Rights Reserved.
|
%% Copyright (c) 2022 EMQ Technologies Co., Ltd. All Rights Reserved.
|
||||||
%%--------------------------------------------------------------------
|
%%--------------------------------------------------------------------
|
||||||
-module(emqx_ee_bridge_dynamo).
|
-module(emqx_bridge_dynamo).
|
||||||
|
|
||||||
-include_lib("typerefl/include/types.hrl").
|
-include_lib("typerefl/include/types.hrl").
|
||||||
-include_lib("hocon/include/hoconsc.hrl").
|
-include_lib("hocon/include/hoconsc.hrl").
|
||||||
|
@ -89,7 +89,7 @@ fields("config") ->
|
||||||
}
|
}
|
||||||
)}
|
)}
|
||||||
] ++
|
] ++
|
||||||
(emqx_ee_connector_dynamo:fields(config) --
|
(emqx_bridge_dynamo_connector:fields(config) --
|
||||||
emqx_connector_schema_lib:prepare_statement_fields());
|
emqx_connector_schema_lib:prepare_statement_fields());
|
||||||
fields("creation_opts") ->
|
fields("creation_opts") ->
|
||||||
emqx_resource_schema:fields("creation_opts");
|
emqx_resource_schema:fields("creation_opts");
|
|
@ -2,7 +2,7 @@
|
||||||
%% Copyright (c) 2023 EMQ Technologies Co., Ltd. All Rights Reserved.
|
%% Copyright (c) 2023 EMQ Technologies Co., Ltd. All Rights Reserved.
|
||||||
%%--------------------------------------------------------------------
|
%%--------------------------------------------------------------------
|
||||||
|
|
||||||
-module(emqx_ee_connector_dynamo).
|
-module(emqx_bridge_dynamo_connector).
|
||||||
|
|
||||||
-behaviour(emqx_resource).
|
-behaviour(emqx_resource).
|
||||||
|
|
||||||
|
@ -131,7 +131,7 @@ on_batch_query(_InstanceId, Query, _State) ->
|
||||||
|
|
||||||
on_get_status(_InstanceId, #{pool_name := Pool}) ->
|
on_get_status(_InstanceId, #{pool_name := Pool}) ->
|
||||||
Health = emqx_resource_pool:health_check_workers(
|
Health = emqx_resource_pool:health_check_workers(
|
||||||
Pool, {emqx_ee_connector_dynamo_client, is_connected, []}
|
Pool, {emqx_bridge_dynamo_connector_client, is_connected, []}
|
||||||
),
|
),
|
||||||
status_result(Health).
|
status_result(Health).
|
||||||
|
|
||||||
|
@ -154,7 +154,7 @@ do_query(
|
||||||
),
|
),
|
||||||
Result = ecpool:pick_and_do(
|
Result = ecpool:pick_and_do(
|
||||||
PoolName,
|
PoolName,
|
||||||
{emqx_ee_connector_dynamo_client, query, [Table, Query, Templates]},
|
{emqx_bridge_dynamo_connector_client, query, [Table, Query, Templates]},
|
||||||
no_handover
|
no_handover
|
||||||
),
|
),
|
||||||
|
|
||||||
|
@ -181,7 +181,7 @@ do_query(
|
||||||
|
|
||||||
connect(Opts) ->
|
connect(Opts) ->
|
||||||
Options = proplists:get_value(config, Opts),
|
Options = proplists:get_value(config, Opts),
|
||||||
{ok, _Pid} = Result = emqx_ee_connector_dynamo_client:start_link(Options),
|
{ok, _Pid} = Result = emqx_bridge_dynamo_connector_client:start_link(Options),
|
||||||
Result.
|
Result.
|
||||||
|
|
||||||
parse_template(Config) ->
|
parse_template(Config) ->
|
|
@ -1,7 +1,8 @@
|
||||||
%%--------------------------------------------------------------------
|
%%--------------------------------------------------------------------
|
||||||
%% Copyright (c) 2023 EMQ Technologies Co., Ltd. All Rights Reserved.
|
%% Copyright (c) 2023 EMQ Technologies Co., Ltd. All Rights Reserved.
|
||||||
%%--------------------------------------------------------------------
|
%%--------------------------------------------------------------------
|
||||||
-module(emqx_ee_connector_dynamo_client).
|
|
||||||
|
-module(emqx_bridge_dynamo_connector_client).
|
||||||
|
|
||||||
-behaviour(gen_server).
|
-behaviour(gen_server).
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
%% Copyright (c) 2022-2023 EMQ Technologies Co., Ltd. All Rights Reserved.
|
%% Copyright (c) 2022-2023 EMQ Technologies Co., Ltd. All Rights Reserved.
|
||||||
%%--------------------------------------------------------------------
|
%%--------------------------------------------------------------------
|
||||||
|
|
||||||
-module(emqx_ee_bridge_dynamo_SUITE).
|
-module(emqx_bridge_dynamo_SUITE).
|
||||||
|
|
||||||
-compile(nowarn_export_all).
|
-compile(nowarn_export_all).
|
||||||
-compile(export_all).
|
-compile(export_all).
|
||||||
|
@ -24,6 +24,14 @@
|
||||||
|
|
||||||
-define(GET_CONFIG(KEY__, CFG__), proplists:get_value(KEY__, CFG__)).
|
-define(GET_CONFIG(KEY__, CFG__), proplists:get_value(KEY__, CFG__)).
|
||||||
|
|
||||||
|
%% How to run it locally (all commands are run in $PROJ_ROOT dir):
|
||||||
|
%% run ct in docker container
|
||||||
|
%% run script:
|
||||||
|
%% ```bash
|
||||||
|
%% ./scripts/ct/run.sh --ci --app apps/emqx_bridge_dynamo -- \
|
||||||
|
%% --name 'test@127.0.0.1' -c -v --readable true \
|
||||||
|
%% --suite apps/emqx_bridge_dynamo/test/emqx_bridge_dynamo_SUITE.erl
|
||||||
|
|
||||||
%%------------------------------------------------------------------------------
|
%%------------------------------------------------------------------------------
|
||||||
%% CT boilerplate
|
%% CT boilerplate
|
||||||
%%------------------------------------------------------------------------------
|
%%------------------------------------------------------------------------------
|
||||||
|
@ -224,7 +232,7 @@ query_resource(Config, Request) ->
|
||||||
ResourceID = emqx_bridge_resource:resource_id(BridgeType, Name),
|
ResourceID = emqx_bridge_resource:resource_id(BridgeType, Name),
|
||||||
emqx_resource:query(ResourceID, Request, #{timeout => 1_000}).
|
emqx_resource:query(ResourceID, Request, #{timeout => 1_000}).
|
||||||
|
|
||||||
%% create a table, use the lib-ee/emqx_ee_bridge/priv/dynamo/mqtt_msg.json as template
|
%% create a table, use the apps/emqx_bridge_dynamo/priv/dynamo/mqtt_msg.json as template
|
||||||
create_table(Config) ->
|
create_table(Config) ->
|
||||||
directly_setup_dynamo(),
|
directly_setup_dynamo(),
|
||||||
delete_table(Config),
|
delete_table(Config),
|
||||||
|
@ -251,7 +259,7 @@ directly_setup_dynamo() ->
|
||||||
|
|
||||||
directly_query(Query) ->
|
directly_query(Query) ->
|
||||||
directly_setup_dynamo(),
|
directly_setup_dynamo(),
|
||||||
emqx_ee_connector_dynamo_client:execute(Query, ?TABLE_BIN).
|
emqx_bridge_dynamo_connector_client:execute(Query, ?TABLE_BIN).
|
||||||
|
|
||||||
directly_get_payload(Key) ->
|
directly_get_payload(Key) ->
|
||||||
case directly_query({get_item, {<<"id">>, Key}}) of
|
case directly_query({get_item, {<<"id">>, Key}}) of
|
|
@ -54,6 +54,7 @@ fields(auth_basic) ->
|
||||||
mk(binary(), #{
|
mk(binary(), #{
|
||||||
required => true,
|
required => true,
|
||||||
desc => ?DESC("config_auth_basic_password"),
|
desc => ?DESC("config_auth_basic_password"),
|
||||||
|
format => <<"password">>,
|
||||||
sensitive => true,
|
sensitive => true,
|
||||||
converter => fun emqx_schema:password_converter/2
|
converter => fun emqx_schema:password_converter/2
|
||||||
})}
|
})}
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
{erl_opts, [debug_info]}.
|
||||||
|
|
||||||
|
{deps, [
|
||||||
|
{emqx_connector, {path, "../../apps/emqx_connector"}},
|
||||||
|
{emqx_resource, {path, "../../apps/emqx_resource"}},
|
||||||
|
{emqx_bridge, {path, "../../apps/emqx_bridge"}}
|
||||||
|
]}.
|
|
@ -1,6 +1,6 @@
|
||||||
{application, emqx_bridge_matrix, [
|
{application, emqx_bridge_matrix, [
|
||||||
{description, "EMQX Enterprise MatrixDB Bridge"},
|
{description, "EMQX Enterprise MatrixDB Bridge"},
|
||||||
{vsn, "0.1.0"},
|
{vsn, "0.1.1"},
|
||||||
{registered, []},
|
{registered, []},
|
||||||
{applications, [kernel, stdlib]},
|
{applications, [kernel, stdlib]},
|
||||||
{env, []},
|
{env, []},
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
%%--------------------------------------------------------------------
|
%%--------------------------------------------------------------------
|
||||||
%% Copyright (c) 2023 EMQ Technologies Co., Ltd. All Rights Reserved.
|
%% Copyright (c) 2023 EMQ Technologies Co., Ltd. All Rights Reserved.
|
||||||
%%--------------------------------------------------------------------
|
%%--------------------------------------------------------------------
|
||||||
-module(emqx_ee_bridge_matrix).
|
-module(emqx_bridge_matrix).
|
||||||
|
|
||||||
-export([
|
-export([
|
||||||
conn_bridge_examples/1
|
conn_bridge_examples/1
|
||||||
|
@ -22,7 +22,7 @@ conn_bridge_examples(Method) ->
|
||||||
#{
|
#{
|
||||||
<<"matrix">> => #{
|
<<"matrix">> => #{
|
||||||
summary => <<"Matrix Bridge">>,
|
summary => <<"Matrix Bridge">>,
|
||||||
value => emqx_ee_bridge_pgsql:values(Method, matrix)
|
value => emqx_bridge_pgsql:values(Method, matrix)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
].
|
].
|
||||||
|
@ -34,9 +34,9 @@ namespace() -> "bridge_matrix".
|
||||||
roots() -> [].
|
roots() -> [].
|
||||||
|
|
||||||
fields("post") ->
|
fields("post") ->
|
||||||
emqx_ee_bridge_pgsql:fields("post", matrix);
|
emqx_bridge_pgsql:fields("post", matrix);
|
||||||
fields(Method) ->
|
fields(Method) ->
|
||||||
emqx_ee_bridge_pgsql:fields(Method).
|
emqx_bridge_pgsql:fields(Method).
|
||||||
|
|
||||||
desc(_) ->
|
desc(_) ->
|
||||||
undefined.
|
undefined.
|
|
@ -0,0 +1,2 @@
|
||||||
|
toxiproxy
|
||||||
|
pgsql
|
|
@ -0,0 +1,7 @@
|
||||||
|
{erl_opts, [debug_info]}.
|
||||||
|
|
||||||
|
{deps, [
|
||||||
|
{emqx_connector, {path, "../../apps/emqx_connector"}},
|
||||||
|
{emqx_resource, {path, "../../apps/emqx_resource"}},
|
||||||
|
{emqx_bridge, {path, "../../apps/emqx_bridge"}}
|
||||||
|
]}.
|
|
@ -1,6 +1,6 @@
|
||||||
{application, emqx_bridge_pgsql, [
|
{application, emqx_bridge_pgsql, [
|
||||||
{description, "EMQX Enterprise PostgreSQL Bridge"},
|
{description, "EMQX Enterprise PostgreSQL Bridge"},
|
||||||
{vsn, "0.1.0"},
|
{vsn, "0.1.1"},
|
||||||
{registered, []},
|
{registered, []},
|
||||||
{applications, [kernel, stdlib]},
|
{applications, [kernel, stdlib]},
|
||||||
{env, []},
|
{env, []},
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
%%--------------------------------------------------------------------
|
%%--------------------------------------------------------------------
|
||||||
%% Copyright (c) 2022 EMQ Technologies Co., Ltd. All Rights Reserved.
|
%% Copyright (c) 2022-2023 EMQ Technologies Co., Ltd. All Rights Reserved.
|
||||||
%%--------------------------------------------------------------------
|
%%--------------------------------------------------------------------
|
||||||
-module(emqx_ee_bridge_pgsql).
|
-module(emqx_bridge_pgsql).
|
||||||
|
|
||||||
-include_lib("typerefl/include/types.hrl").
|
-include_lib("typerefl/include/types.hrl").
|
||||||
-include_lib("hocon/include/hoconsc.hrl").
|
-include_lib("hocon/include/hoconsc.hrl").
|
|
@ -2,7 +2,7 @@
|
||||||
%% Copyright (c) 2022-2023 EMQ Technologies Co., Ltd. All Rights Reserved.
|
%% Copyright (c) 2022-2023 EMQ Technologies Co., Ltd. All Rights Reserved.
|
||||||
%%--------------------------------------------------------------------
|
%%--------------------------------------------------------------------
|
||||||
|
|
||||||
-module(emqx_ee_bridge_pgsql_SUITE).
|
-module(emqx_bridge_pgsql_SUITE).
|
||||||
|
|
||||||
-compile(nowarn_export_all).
|
-compile(nowarn_export_all).
|
||||||
-compile(export_all).
|
-compile(export_all).
|
|
@ -95,7 +95,7 @@ fields("config") ->
|
||||||
fields("creation_opts") ->
|
fields("creation_opts") ->
|
||||||
emqx_resource_schema:fields("creation_opts");
|
emqx_resource_schema:fields("creation_opts");
|
||||||
fields("post") ->
|
fields("post") ->
|
||||||
fields("post", clickhouse);
|
fields("post", rabbitmq);
|
||||||
fields("put") ->
|
fields("put") ->
|
||||||
fields("config");
|
fields("config");
|
||||||
fields("get") ->
|
fields("get") ->
|
||||||
|
|
|
@ -72,14 +72,7 @@ fields(config) ->
|
||||||
desc => ?DESC("username")
|
desc => ?DESC("username")
|
||||||
}
|
}
|
||||||
)},
|
)},
|
||||||
{password,
|
{password, fun emqx_connector_schema_lib:password/1},
|
||||||
hoconsc:mk(
|
|
||||||
typerefl:binary(),
|
|
||||||
#{
|
|
||||||
required => true,
|
|
||||||
desc => ?DESC("password")
|
|
||||||
}
|
|
||||||
)},
|
|
||||||
{pool_size,
|
{pool_size,
|
||||||
hoconsc:mk(
|
hoconsc:mk(
|
||||||
typerefl:pos_integer(),
|
typerefl:pos_integer(),
|
||||||
|
@ -129,14 +122,6 @@ fields(config) ->
|
||||||
desc => ?DESC("heartbeat")
|
desc => ?DESC("heartbeat")
|
||||||
}
|
}
|
||||||
)},
|
)},
|
||||||
{auto_reconnect,
|
|
||||||
hoconsc:mk(
|
|
||||||
emqx_schema:duration_ms(),
|
|
||||||
#{
|
|
||||||
default => <<"2s">>,
|
|
||||||
desc => ?DESC("auto_reconnect")
|
|
||||||
}
|
|
||||||
)},
|
|
||||||
%% Things related to sending messages to RabbitMQ
|
%% Things related to sending messages to RabbitMQ
|
||||||
{exchange,
|
{exchange,
|
||||||
hoconsc:mk(
|
hoconsc:mk(
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
toxiproxy
|
||||||
|
tdengine
|
|
@ -0,0 +1,8 @@
|
||||||
|
{erl_opts, [debug_info]}.
|
||||||
|
|
||||||
|
{deps, [
|
||||||
|
{tdengine, {git, "https://github.com/emqx/tdengine-client-erl", {tag, "0.1.6"}}},
|
||||||
|
{emqx_connector, {path, "../../apps/emqx_connector"}},
|
||||||
|
{emqx_resource, {path, "../../apps/emqx_resource"}},
|
||||||
|
{emqx_bridge, {path, "../../apps/emqx_bridge"}}
|
||||||
|
]}.
|
|
@ -1,8 +1,8 @@
|
||||||
{application, emqx_bridge_tdengine, [
|
{application, emqx_bridge_tdengine, [
|
||||||
{description, "EMQX Enterprise TDEngine Bridge"},
|
{description, "EMQX Enterprise TDEngine Bridge"},
|
||||||
{vsn, "0.1.0"},
|
{vsn, "0.1.1"},
|
||||||
{registered, []},
|
{registered, []},
|
||||||
{applications, [kernel, stdlib]},
|
{applications, [kernel, stdlib, tdengine]},
|
||||||
{env, []},
|
{env, []},
|
||||||
{modules, []},
|
{modules, []},
|
||||||
{links, []}
|
{links, []}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
%%--------------------------------------------------------------------
|
%%--------------------------------------------------------------------
|
||||||
%% Copyright (c) 2023 EMQ Technologies Co., Ltd. All Rights Reserved.
|
%% Copyright (c) 2023 EMQ Technologies Co., Ltd. All Rights Reserved.
|
||||||
%%--------------------------------------------------------------------
|
%%--------------------------------------------------------------------
|
||||||
-module(emqx_ee_bridge_tdengine).
|
-module(emqx_bridge_tdengine).
|
||||||
|
|
||||||
-include_lib("typerefl/include/types.hrl").
|
-include_lib("typerefl/include/types.hrl").
|
||||||
-include_lib("hocon/include/hoconsc.hrl").
|
-include_lib("hocon/include/hoconsc.hrl").
|
||||||
|
@ -81,7 +81,8 @@ fields("config") ->
|
||||||
binary(),
|
binary(),
|
||||||
#{desc => ?DESC("local_topic"), default => undefined}
|
#{desc => ?DESC("local_topic"), default => undefined}
|
||||||
)}
|
)}
|
||||||
] ++ emqx_resource_schema:fields("resource_opts") ++ emqx_ee_connector_tdengine:fields(config);
|
] ++ emqx_resource_schema:fields("resource_opts") ++
|
||||||
|
emqx_bridge_tdengine_connector:fields(config);
|
||||||
fields("post") ->
|
fields("post") ->
|
||||||
[type_field(), name_field() | fields("config")];
|
[type_field(), name_field() | fields("config")];
|
||||||
fields("put") ->
|
fields("put") ->
|
|
@ -2,7 +2,7 @@
|
||||||
%% Copyright (c) 2023 EMQ Technologies Co., Ltd. All Rights Reserved.
|
%% Copyright (c) 2023 EMQ Technologies Co., Ltd. All Rights Reserved.
|
||||||
%%--------------------------------------------------------------------
|
%%--------------------------------------------------------------------
|
||||||
|
|
||||||
-module(emqx_ee_connector_tdengine).
|
-module(emqx_bridge_tdengine_connector).
|
||||||
|
|
||||||
-behaviour(emqx_resource).
|
-behaviour(emqx_resource).
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
%% Copyright (c) 2022-2023 EMQ Technologies Co., Ltd. All Rights Reserved.
|
%% Copyright (c) 2022-2023 EMQ Technologies Co., Ltd. All Rights Reserved.
|
||||||
%%--------------------------------------------------------------------
|
%%--------------------------------------------------------------------
|
||||||
|
|
||||||
-module(emqx_ee_bridge_tdengine_SUITE).
|
-module(emqx_bridge_tdengine_SUITE).
|
||||||
|
|
||||||
-compile(nowarn_export_all).
|
-compile(nowarn_export_all).
|
||||||
-compile(export_all).
|
-compile(export_all).
|
|
@ -0,0 +1,7 @@
|
||||||
|
{erl_opts, [debug_info]}.
|
||||||
|
|
||||||
|
{deps, [
|
||||||
|
{emqx_connector, {path, "../../apps/emqx_connector"}},
|
||||||
|
{emqx_resource, {path, "../../apps/emqx_resource"}},
|
||||||
|
{emqx_bridge, {path, "../../apps/emqx_bridge"}}
|
||||||
|
]}.
|
|
@ -1,6 +1,6 @@
|
||||||
{application, emqx_bridge_timescale, [
|
{application, emqx_bridge_timescale, [
|
||||||
{description, "EMQX Enterprise TimescaleDB Bridge"},
|
{description, "EMQX Enterprise TimescaleDB Bridge"},
|
||||||
{vsn, "0.1.0"},
|
{vsn, "0.1.1"},
|
||||||
{registered, []},
|
{registered, []},
|
||||||
{applications, [kernel, stdlib]},
|
{applications, [kernel, stdlib]},
|
||||||
{env, []},
|
{env, []},
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
%%--------------------------------------------------------------------
|
%%--------------------------------------------------------------------
|
||||||
%% Copyright (c) 2023 EMQ Technologies Co., Ltd. All Rights Reserved.
|
%% Copyright (c) 2023 EMQ Technologies Co., Ltd. All Rights Reserved.
|
||||||
%%--------------------------------------------------------------------
|
%%--------------------------------------------------------------------
|
||||||
-module(emqx_ee_bridge_timescale).
|
-module(emqx_bridge_timescale).
|
||||||
|
|
||||||
-export([
|
-export([
|
||||||
conn_bridge_examples/1
|
conn_bridge_examples/1
|
||||||
|
@ -22,7 +22,7 @@ conn_bridge_examples(Method) ->
|
||||||
#{
|
#{
|
||||||
<<"timescale">> => #{
|
<<"timescale">> => #{
|
||||||
summary => <<"Timescale Bridge">>,
|
summary => <<"Timescale Bridge">>,
|
||||||
value => emqx_ee_bridge_pgsql:values(Method, timescale)
|
value => emqx_bridge_pgsql:values(Method, timescale)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
].
|
].
|
||||||
|
@ -34,9 +34,9 @@ namespace() -> "bridge_timescale".
|
||||||
roots() -> [].
|
roots() -> [].
|
||||||
|
|
||||||
fields("post") ->
|
fields("post") ->
|
||||||
emqx_ee_bridge_pgsql:fields("post", timescale);
|
emqx_bridge_pgsql:fields("post", timescale);
|
||||||
fields(Method) ->
|
fields(Method) ->
|
||||||
emqx_ee_bridge_pgsql:fields(Method).
|
emqx_bridge_pgsql:fields(Method).
|
||||||
|
|
||||||
desc(_) ->
|
desc(_) ->
|
||||||
undefined.
|
undefined.
|
|
@ -0,0 +1 @@
|
||||||
|
Refactor the directory structure of the TDEngine data bridge.
|
|
@ -0,0 +1 @@
|
||||||
|
Refactor the directory structure of the PostgreSQL && Matrix && Timescale data bridges.
|
|
@ -5,7 +5,4 @@ mongo_rs_sharded
|
||||||
mysql
|
mysql
|
||||||
redis
|
redis
|
||||||
redis_cluster
|
redis_cluster
|
||||||
pgsql
|
|
||||||
tdengine
|
|
||||||
clickhouse
|
clickhouse
|
||||||
dynamo
|
|
||||||
|
|
|
@ -12,9 +12,11 @@
|
||||||
emqx_bridge_cassandra,
|
emqx_bridge_cassandra,
|
||||||
emqx_bridge_opents,
|
emqx_bridge_opents,
|
||||||
emqx_bridge_pulsar,
|
emqx_bridge_pulsar,
|
||||||
|
emqx_bridge_dynamo,
|
||||||
emqx_bridge_sqlserver,
|
emqx_bridge_sqlserver,
|
||||||
emqx_bridge_rocketmq,
|
emqx_bridge_rocketmq,
|
||||||
emqx_bridge_rabbitmq
|
emqx_bridge_rabbitmq,
|
||||||
|
emqx_bridge_tdengine
|
||||||
]},
|
]},
|
||||||
{env, []},
|
{env, []},
|
||||||
{modules, []},
|
{modules, []},
|
||||||
|
|
|
@ -19,7 +19,7 @@ api_schemas(Method) ->
|
||||||
ref(emqx_bridge_kafka, Method ++ "_producer"),
|
ref(emqx_bridge_kafka, Method ++ "_producer"),
|
||||||
ref(emqx_bridge_cassandra, Method),
|
ref(emqx_bridge_cassandra, Method),
|
||||||
ref(emqx_ee_bridge_mysql, Method),
|
ref(emqx_ee_bridge_mysql, Method),
|
||||||
ref(emqx_ee_bridge_pgsql, Method),
|
ref(emqx_bridge_pgsql, Method),
|
||||||
ref(emqx_ee_bridge_mongodb, Method ++ "_rs"),
|
ref(emqx_ee_bridge_mongodb, Method ++ "_rs"),
|
||||||
ref(emqx_ee_bridge_mongodb, Method ++ "_sharded"),
|
ref(emqx_ee_bridge_mongodb, Method ++ "_sharded"),
|
||||||
ref(emqx_ee_bridge_mongodb, Method ++ "_single"),
|
ref(emqx_ee_bridge_mongodb, Method ++ "_single"),
|
||||||
|
@ -29,11 +29,11 @@ api_schemas(Method) ->
|
||||||
ref(emqx_ee_bridge_redis, Method ++ "_single"),
|
ref(emqx_ee_bridge_redis, Method ++ "_single"),
|
||||||
ref(emqx_ee_bridge_redis, Method ++ "_sentinel"),
|
ref(emqx_ee_bridge_redis, Method ++ "_sentinel"),
|
||||||
ref(emqx_ee_bridge_redis, Method ++ "_cluster"),
|
ref(emqx_ee_bridge_redis, Method ++ "_cluster"),
|
||||||
ref(emqx_ee_bridge_timescale, Method),
|
ref(emqx_bridge_timescale, Method),
|
||||||
ref(emqx_ee_bridge_matrix, Method),
|
ref(emqx_bridge_matrix, Method),
|
||||||
ref(emqx_ee_bridge_tdengine, Method),
|
ref(emqx_bridge_tdengine, Method),
|
||||||
ref(emqx_ee_bridge_clickhouse, Method),
|
ref(emqx_ee_bridge_clickhouse, Method),
|
||||||
ref(emqx_ee_bridge_dynamo, Method),
|
ref(emqx_bridge_dynamo, Method),
|
||||||
ref(emqx_bridge_rocketmq, Method),
|
ref(emqx_bridge_rocketmq, Method),
|
||||||
ref(emqx_bridge_sqlserver, Method),
|
ref(emqx_bridge_sqlserver, Method),
|
||||||
ref(emqx_bridge_opents, Method),
|
ref(emqx_bridge_opents, Method),
|
||||||
|
@ -53,12 +53,12 @@ schema_modules() ->
|
||||||
emqx_ee_bridge_mongodb,
|
emqx_ee_bridge_mongodb,
|
||||||
emqx_ee_bridge_mysql,
|
emqx_ee_bridge_mysql,
|
||||||
emqx_ee_bridge_redis,
|
emqx_ee_bridge_redis,
|
||||||
emqx_ee_bridge_pgsql,
|
emqx_bridge_pgsql,
|
||||||
emqx_ee_bridge_timescale,
|
emqx_bridge_timescale,
|
||||||
emqx_ee_bridge_matrix,
|
emqx_bridge_matrix,
|
||||||
emqx_ee_bridge_tdengine,
|
emqx_bridge_tdengine,
|
||||||
emqx_ee_bridge_clickhouse,
|
emqx_ee_bridge_clickhouse,
|
||||||
emqx_ee_bridge_dynamo,
|
emqx_bridge_dynamo,
|
||||||
emqx_bridge_rocketmq,
|
emqx_bridge_rocketmq,
|
||||||
emqx_bridge_sqlserver,
|
emqx_bridge_sqlserver,
|
||||||
emqx_bridge_opents,
|
emqx_bridge_opents,
|
||||||
|
@ -100,9 +100,9 @@ resource_type(redis_cluster) -> emqx_ee_connector_redis;
|
||||||
resource_type(pgsql) -> emqx_connector_pgsql;
|
resource_type(pgsql) -> emqx_connector_pgsql;
|
||||||
resource_type(timescale) -> emqx_connector_pgsql;
|
resource_type(timescale) -> emqx_connector_pgsql;
|
||||||
resource_type(matrix) -> emqx_connector_pgsql;
|
resource_type(matrix) -> emqx_connector_pgsql;
|
||||||
resource_type(tdengine) -> emqx_ee_connector_tdengine;
|
resource_type(tdengine) -> emqx_bridge_tdengine_connector;
|
||||||
resource_type(clickhouse) -> emqx_ee_connector_clickhouse;
|
resource_type(clickhouse) -> emqx_ee_connector_clickhouse;
|
||||||
resource_type(dynamo) -> emqx_ee_connector_dynamo;
|
resource_type(dynamo) -> emqx_bridge_dynamo_connector;
|
||||||
resource_type(rocketmq) -> emqx_bridge_rocketmq_connector;
|
resource_type(rocketmq) -> emqx_bridge_rocketmq_connector;
|
||||||
resource_type(sqlserver) -> emqx_bridge_sqlserver_connector;
|
resource_type(sqlserver) -> emqx_bridge_sqlserver_connector;
|
||||||
resource_type(opents) -> emqx_bridge_opents_connector;
|
resource_type(opents) -> emqx_bridge_opents_connector;
|
||||||
|
@ -139,7 +139,7 @@ fields(bridges) ->
|
||||||
)},
|
)},
|
||||||
{tdengine,
|
{tdengine,
|
||||||
mk(
|
mk(
|
||||||
hoconsc:map(name, ref(emqx_ee_bridge_tdengine, "config")),
|
hoconsc:map(name, ref(emqx_bridge_tdengine, "config")),
|
||||||
#{
|
#{
|
||||||
desc => <<"TDengine Bridge Config">>,
|
desc => <<"TDengine Bridge Config">>,
|
||||||
required => false
|
required => false
|
||||||
|
@ -147,7 +147,7 @@ fields(bridges) ->
|
||||||
)},
|
)},
|
||||||
{dynamo,
|
{dynamo,
|
||||||
mk(
|
mk(
|
||||||
hoconsc:map(name, ref(emqx_ee_bridge_dynamo, "config")),
|
hoconsc:map(name, ref(emqx_bridge_dynamo, "config")),
|
||||||
#{
|
#{
|
||||||
desc => <<"Dynamo Bridge Config">>,
|
desc => <<"Dynamo Bridge Config">>,
|
||||||
required => false
|
required => false
|
||||||
|
@ -280,7 +280,7 @@ pgsql_structs() ->
|
||||||
[
|
[
|
||||||
{Type,
|
{Type,
|
||||||
mk(
|
mk(
|
||||||
hoconsc:map(name, ref(emqx_ee_bridge_pgsql, "config")),
|
hoconsc:map(name, ref(emqx_bridge_pgsql, "config")),
|
||||||
#{
|
#{
|
||||||
desc => <<Name/binary, " Bridge Config">>,
|
desc => <<Name/binary, " Bridge Config">>,
|
||||||
required => false
|
required => false
|
||||||
|
|
|
@ -1,10 +1,9 @@
|
||||||
|
%% -*- mode: erlang -*-
|
||||||
{erl_opts, [debug_info]}.
|
{erl_opts, [debug_info]}.
|
||||||
{deps, [
|
{deps, [
|
||||||
{hstreamdb_erl, {git, "https://github.com/hstreamdb/hstreamdb_erl.git", {tag, "0.2.5"}}},
|
{hstreamdb_erl, {git, "https://github.com/hstreamdb/hstreamdb_erl.git", {tag, "0.2.5"}}},
|
||||||
{influxdb, {git, "https://github.com/emqx/influxdb-client-erl", {tag, "1.1.9"}}},
|
{influxdb, {git, "https://github.com/emqx/influxdb-client-erl", {tag, "1.1.9"}}},
|
||||||
{tdengine, {git, "https://github.com/emqx/tdengine-client-erl", {tag, "0.1.6"}}},
|
|
||||||
{clickhouse, {git, "https://github.com/emqx/clickhouse-client-erl", {tag, "0.3"}}},
|
{clickhouse, {git, "https://github.com/emqx/clickhouse-client-erl", {tag, "0.3"}}},
|
||||||
{erlcloud, {git, "https://github.com/emqx/erlcloud", {tag, "3.6.8-emqx-1"}}},
|
|
||||||
{emqx, {path, "../../apps/emqx"}},
|
{emqx, {path, "../../apps/emqx"}},
|
||||||
{emqx_utils, {path, "../../apps/emqx_utils"}}
|
{emqx_utils, {path, "../../apps/emqx_utils"}}
|
||||||
]}.
|
]}.
|
||||||
|
|
|
@ -8,9 +8,7 @@
|
||||||
ecpool,
|
ecpool,
|
||||||
hstreamdb_erl,
|
hstreamdb_erl,
|
||||||
influxdb,
|
influxdb,
|
||||||
tdengine,
|
clickhouse
|
||||||
clickhouse,
|
|
||||||
erlcloud
|
|
||||||
]},
|
]},
|
||||||
{env, []},
|
{env, []},
|
||||||
{modules, []},
|
{modules, []},
|
||||||
|
|
7
mix.exs
7
mix.exs
|
@ -192,6 +192,13 @@ defmodule EMQXUmbrella.MixProject do
|
||||||
{:snappyer, "1.2.8", override: true},
|
{:snappyer, "1.2.8", override: true},
|
||||||
{:crc32cer, "0.1.8", override: true},
|
{:crc32cer, "0.1.8", override: true},
|
||||||
{:supervisor3, "1.1.12", override: true},
|
{:supervisor3, "1.1.12", override: true},
|
||||||
|
{:erlcloud, github: "emqx/erlcloud", tag: "3.5.16-emqx-1", override: true},
|
||||||
|
# erlcloud's rebar.config requires rebar3 and does not support Mix,
|
||||||
|
# so it tries to fetch deps from git. We need to override this.
|
||||||
|
{:lhttpc, tag: "1.6.2", override: true},
|
||||||
|
{:eini, "1.2.9", override: true},
|
||||||
|
{:base16, "1.0.0", override: true},
|
||||||
|
# end of erlcloud's deps
|
||||||
{:opentsdb, github: "emqx/opentsdb-client-erl", tag: "v0.5.1", override: true},
|
{:opentsdb, github: "emqx/opentsdb-client-erl", tag: "v0.5.1", override: true},
|
||||||
# The following two are dependencies of rabbit_common. They are needed here to
|
# The following two are dependencies of rabbit_common. They are needed here to
|
||||||
# make mix not complain about conflicting versions
|
# make mix not complain about conflicting versions
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
emqx_ee_bridge_dynamo {
|
emqx_bridge_dynamo {
|
||||||
|
|
||||||
config_enable.desc:
|
config_enable.desc:
|
||||||
"""Enable or disable this bridge"""
|
"""Enable or disable this bridge"""
|
|
@ -1,4 +1,4 @@
|
||||||
emqx_ee_connector_dynamo {
|
emqx_bridge_dynamo_connector {
|
||||||
|
|
||||||
aws_access_key_id.desc:
|
aws_access_key_id.desc:
|
||||||
"""Access Key ID for connecting to DynamoDB."""
|
"""Access Key ID for connecting to DynamoDB."""
|
|
@ -1,4 +1,4 @@
|
||||||
emqx_ee_bridge_pgsql {
|
emqx_bridge_pgsql {
|
||||||
|
|
||||||
config_enable.desc:
|
config_enable.desc:
|
||||||
"""Enable or disable this bridge"""
|
"""Enable or disable this bridge"""
|
|
@ -1,4 +1,4 @@
|
||||||
emqx_ee_bridge_tdengine {
|
emqx_bridge_tdengine {
|
||||||
|
|
||||||
config_enable.desc:
|
config_enable.desc:
|
||||||
"""Enable or disable this bridge"""
|
"""Enable or disable this bridge"""
|
|
@ -1,4 +1,4 @@
|
||||||
emqx_ee_connector_tdengine {
|
emqx_bridge_tdengine_connector {
|
||||||
|
|
||||||
server.desc:
|
server.desc:
|
||||||
"""The IPv4 or IPv6 address or the hostname to connect to.<br/>
|
"""The IPv4 or IPv6 address or the hostname to connect to.<br/>
|
|
@ -1,4 +1,4 @@
|
||||||
emqx_ee_bridge_dynamo {
|
emqx_bridge_dynamo {
|
||||||
|
|
||||||
config_enable.desc:
|
config_enable.desc:
|
||||||
"""启用/禁用桥接"""
|
"""启用/禁用桥接"""
|
|
@ -1,4 +1,4 @@
|
||||||
emqx_ee_connector_dynamo {
|
emqx_bridge_dynamo_connector {
|
||||||
|
|
||||||
aws_access_key_id.desc:
|
aws_access_key_id.desc:
|
||||||
"""DynamoDB 的访问 ID。"""
|
"""DynamoDB 的访问 ID。"""
|
|
@ -1,4 +1,4 @@
|
||||||
emqx_ee_bridge_pgsql {
|
emqx_bridge_pgsql {
|
||||||
|
|
||||||
config_enable.desc:
|
config_enable.desc:
|
||||||
"""启用/禁用桥接"""
|
"""启用/禁用桥接"""
|
|
@ -1,4 +1,4 @@
|
||||||
emqx_ee_bridge_tdengine {
|
emqx_bridge_tdengine {
|
||||||
|
|
||||||
config_enable.desc:
|
config_enable.desc:
|
||||||
"""启用/禁用桥接"""
|
"""启用/禁用桥接"""
|
|
@ -1,4 +1,4 @@
|
||||||
emqx_ee_connector_tdengine {
|
emqx_bridge_tdengine_connector {
|
||||||
|
|
||||||
server.desc:
|
server.desc:
|
||||||
"""将要连接的 IPv4 或 IPv6 地址,或者主机名。<br/>
|
"""将要连接的 IPv4 或 IPv6 地址,或者主机名。<br/>
|
Loading…
Reference in New Issue