fix: exs deps & bad suites
This commit is contained in:
parent
be6de4aad0
commit
9ae7c62656
|
@ -1,7 +1,7 @@
|
||||||
%% -*- mode: erlang -*-
|
%% -*- mode: erlang -*-
|
||||||
{application, emqx_bridge, [
|
{application, emqx_bridge, [
|
||||||
{description, "An OTP application"},
|
{description, "An OTP application"},
|
||||||
{vsn, "0.1.0"},
|
{vsn, "0.1.1"},
|
||||||
{registered, []},
|
{registered, []},
|
||||||
{mod, {emqx_bridge_app, []}},
|
{mod, {emqx_bridge_app, []}},
|
||||||
{applications, [
|
{applications, [
|
||||||
|
|
|
@ -239,7 +239,7 @@ is_tmp_path(TmpPath, File) ->
|
||||||
string:str(str(File), str(TmpPath)) > 0.
|
string:str(str(File), str(TmpPath)) > 0.
|
||||||
|
|
||||||
parse_confs(
|
parse_confs(
|
||||||
webhook,
|
Type,
|
||||||
_Name,
|
_Name,
|
||||||
#{
|
#{
|
||||||
url := Url,
|
url := Url,
|
||||||
|
@ -248,7 +248,7 @@ parse_confs(
|
||||||
headers := Headers,
|
headers := Headers,
|
||||||
request_timeout := ReqTimeout
|
request_timeout := ReqTimeout
|
||||||
} = Conf
|
} = Conf
|
||||||
) ->
|
) when Type == webhook orelse Type == <<"webhook">> ->
|
||||||
{BaseUrl, Path} = parse_url(Url),
|
{BaseUrl, Path} = parse_url(Url),
|
||||||
{ok, BaseUrl2} = emqx_http_lib:uri_parse(BaseUrl),
|
{ok, BaseUrl2} = emqx_http_lib:uri_parse(BaseUrl),
|
||||||
Conf#{
|
Conf#{
|
||||||
|
@ -262,7 +262,7 @@ parse_confs(
|
||||||
request_timeout => ReqTimeout
|
request_timeout => ReqTimeout
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
parse_confs(Type = mqtt, Name, #{connector := ConnId, direction := Direction} = Conf) when
|
parse_confs(Type, Name, #{connector := ConnId, direction := Direction} = Conf) when
|
||||||
is_binary(ConnId)
|
is_binary(ConnId)
|
||||||
->
|
->
|
||||||
case emqx_connector:parse_connector_id(ConnId) of
|
case emqx_connector:parse_connector_id(ConnId) of
|
||||||
|
@ -278,7 +278,7 @@ parse_confs(Type = mqtt, Name, #{connector := ConnId, direction := Direction} =
|
||||||
{_ConnType, _ConnName} ->
|
{_ConnType, _ConnName} ->
|
||||||
error({cannot_use_connector_with_different_type, ConnId})
|
error({cannot_use_connector_with_different_type, ConnId})
|
||||||
end;
|
end;
|
||||||
parse_confs(Type = mqtt, Name, #{connector := ConnectorConfs, direction := Direction} = Conf) when
|
parse_confs(Type, Name, #{connector := ConnectorConfs, direction := Direction} = Conf) when
|
||||||
is_map(ConnectorConfs)
|
is_map(ConnectorConfs)
|
||||||
->
|
->
|
||||||
make_resource_confs(
|
make_resource_confs(
|
||||||
|
@ -288,16 +288,8 @@ parse_confs(Type = mqtt, Name, #{connector := ConnectorConfs, direction := Direc
|
||||||
Type,
|
Type,
|
||||||
Name
|
Name
|
||||||
);
|
);
|
||||||
parse_confs(Type, Name, Conf) ->
|
parse_confs(_Type, _Name, Conf) ->
|
||||||
parse_enterprise_confs(Type, Name, Conf).
|
Conf.
|
||||||
|
|
||||||
-if(?EMQX_RELEASE_EDITION == ee).
|
|
||||||
parse_enterprise_confs(Type, Name, Conf) ->
|
|
||||||
emqx_ee_bridge:parse_conf(Type, Name, Conf).
|
|
||||||
-else.
|
|
||||||
parse_enterprise_confs(Type, Name, _Conf) ->
|
|
||||||
error({not_supported, Type, Name}).
|
|
||||||
-endif.
|
|
||||||
|
|
||||||
make_resource_confs(ingress, ConnectorConfs, BridgeConf, Type, Name) ->
|
make_resource_confs(ingress, ConnectorConfs, BridgeConf, Type, Name) ->
|
||||||
BName = bridge_id(Type, Name),
|
BName = bridge_id(Type, Name),
|
||||||
|
|
|
@ -9,7 +9,6 @@
|
||||||
schema_modules/0,
|
schema_modules/0,
|
||||||
conn_bridge_examples/1,
|
conn_bridge_examples/1,
|
||||||
resource_type/1,
|
resource_type/1,
|
||||||
parse_conf/3,
|
|
||||||
fields/1
|
fields/1
|
||||||
]).
|
]).
|
||||||
|
|
||||||
|
@ -27,14 +26,11 @@ conn_bridge_examples(Method) ->
|
||||||
resource_type(hstream) -> emqx_ee_connector_hstream;
|
resource_type(hstream) -> emqx_ee_connector_hstream;
|
||||||
resource_type(<<"hstream">>) -> emqx_ee_connector_hstream.
|
resource_type(<<"hstream">>) -> emqx_ee_connector_hstream.
|
||||||
|
|
||||||
parse_conf(_Type, _Name, Conf) ->
|
|
||||||
Conf.
|
|
||||||
|
|
||||||
fields(bridges) ->
|
fields(bridges) ->
|
||||||
[
|
[
|
||||||
{hstream,
|
{hstream,
|
||||||
mk(
|
mk(
|
||||||
hoconsc:map(name, ref(emqx_ee_bridge_hstream, "config")),
|
hoconsc:map(name, ref(emqx_ee_bridge_hstream, "config")),
|
||||||
#{desc => <<"emqx enterprise config">>}
|
#{desc => <<"EMQX Enterprise Config">>}
|
||||||
)}
|
)}
|
||||||
].
|
].
|
||||||
|
|
|
@ -0,0 +1,16 @@
|
||||||
|
%%--------------------------------------------------------------------
|
||||||
|
%% Copyright (c) 2022 EMQ Technologies Co., Ltd. All Rights Reserved.
|
||||||
|
%%--------------------------------------------------------------------
|
||||||
|
|
||||||
|
-module(ee_bridge_hstream_SUITE).
|
||||||
|
|
||||||
|
-compile(nowarn_export_all).
|
||||||
|
-compile(export_all).
|
||||||
|
|
||||||
|
-include_lib("eunit/include/eunit.hrl").
|
||||||
|
-include_lib("common_test/include/ct.hrl").
|
||||||
|
|
||||||
|
all() ->
|
||||||
|
emqx_common_test_helpers:all(?MODULE).
|
||||||
|
|
||||||
|
%% TODO:
|
|
@ -2,41 +2,41 @@
|
||||||
emqx_ee_connector_hstream {
|
emqx_ee_connector_hstream {
|
||||||
url {
|
url {
|
||||||
desc {
|
desc {
|
||||||
en: """Hstream Server URL"""
|
en: """HStream Server URL"""
|
||||||
zh: """HStream 服务器 URL"""
|
zh: """HStream 服务器 URL"""
|
||||||
}
|
}
|
||||||
label {
|
label {
|
||||||
en: """Hstream Server URL"""
|
en: """HStream Server URL"""
|
||||||
zh: """HStream 服务器 URL"""
|
zh: """HStream 服务器 URL"""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stream_name {
|
stream_name {
|
||||||
desc {
|
desc {
|
||||||
en: """Hstream Stream Name"""
|
en: """HStream Stream Name"""
|
||||||
zh: """HStream 流名称"""
|
zh: """HStream 流名称"""
|
||||||
}
|
}
|
||||||
label {
|
label {
|
||||||
en: """Hstream Stream Name"""
|
en: """HStream Stream Name"""
|
||||||
zh: """HStream 流名称"""
|
zh: """HStream 流名称"""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ordering_key {
|
ordering_key {
|
||||||
desc {
|
desc {
|
||||||
en: """Hstream Ordering Key"""
|
en: """HStream Ordering Key"""
|
||||||
zh: """HStream 分区键"""
|
zh: """HStream 分区键"""
|
||||||
}
|
}
|
||||||
label {
|
label {
|
||||||
en: """Hstream Ordering Key"""
|
en: """HStream Ordering Key"""
|
||||||
zh: """HStream 分区键"""
|
zh: """HStream 分区键"""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
pool_size {
|
pool_size {
|
||||||
desc {
|
desc {
|
||||||
en: """Hstream Pool Size"""
|
en: """HStream Pool Size"""
|
||||||
zh: """HStream 连接池大小"""
|
zh: """HStream 连接池大小"""
|
||||||
}
|
}
|
||||||
label {
|
label {
|
||||||
en: """Hstream Pool Size"""
|
en: """HStream Pool Size"""
|
||||||
zh: """HStream 连接池大小"""
|
zh: """HStream 连接池大小"""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,16 @@
|
||||||
|
%%--------------------------------------------------------------------
|
||||||
|
%% Copyright (c) 2022 EMQ Technologies Co., Ltd. All Rights Reserved.
|
||||||
|
%%--------------------------------------------------------------------
|
||||||
|
|
||||||
|
-module(ee_connector_hstream_SUITE).
|
||||||
|
|
||||||
|
-compile(nowarn_export_all).
|
||||||
|
-compile(export_all).
|
||||||
|
|
||||||
|
-include_lib("eunit/include/eunit.hrl").
|
||||||
|
-include_lib("common_test/include/ct.hrl").
|
||||||
|
|
||||||
|
all() ->
|
||||||
|
emqx_common_test_helpers:all(?MODULE).
|
||||||
|
|
||||||
|
%% TODO:
|
7
mix.exs
7
mix.exs
|
@ -88,7 +88,8 @@ defmodule EMQXUmbrella.MixProject do
|
||||||
{:ranch,
|
{:ranch,
|
||||||
github: "ninenines/ranch", ref: "a692f44567034dacf5efcaa24a24183788594eb7", override: true},
|
github: "ninenines/ranch", ref: "a692f44567034dacf5efcaa24a24183788594eb7", override: true},
|
||||||
# in conflict by grpc and eetcd
|
# in conflict by grpc and eetcd
|
||||||
{:gpb, "4.11.2", override: true, runtime: false}
|
{:gpb, "4.11.2", override: true, runtime: false},
|
||||||
|
{:hstreamdb_erl, github: "hstreamdb/hstreamdb_erl", tag: "0.2.5"}
|
||||||
] ++ umbrella_apps() ++ bcrypt_dep() ++ jq_dep() ++ quicer_dep()
|
] ++ umbrella_apps() ++ bcrypt_dep() ++ jq_dep() ++ quicer_dep()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -215,7 +216,9 @@ defmodule EMQXUmbrella.MixProject do
|
||||||
if(edition_type == :enterprise,
|
if(edition_type == :enterprise,
|
||||||
do: [
|
do: [
|
||||||
emqx_license: :permanent,
|
emqx_license: :permanent,
|
||||||
emqx_enterprise_conf: :load
|
emqx_enterprise_conf: :load,
|
||||||
|
emqx_ee_connector: :permanent,
|
||||||
|
emqx_ee_bridge: :permanent
|
||||||
],
|
],
|
||||||
else: []
|
else: []
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue