fix: exs deps & bad suites
This commit is contained in:
parent
be6de4aad0
commit
9ae7c62656
|
@ -1,7 +1,7 @@
|
|||
%% -*- mode: erlang -*-
|
||||
{application, emqx_bridge, [
|
||||
{description, "An OTP application"},
|
||||
{vsn, "0.1.0"},
|
||||
{vsn, "0.1.1"},
|
||||
{registered, []},
|
||||
{mod, {emqx_bridge_app, []}},
|
||||
{applications, [
|
||||
|
|
|
@ -239,7 +239,7 @@ is_tmp_path(TmpPath, File) ->
|
|||
string:str(str(File), str(TmpPath)) > 0.
|
||||
|
||||
parse_confs(
|
||||
webhook,
|
||||
Type,
|
||||
_Name,
|
||||
#{
|
||||
url := Url,
|
||||
|
@ -248,7 +248,7 @@ parse_confs(
|
|||
headers := Headers,
|
||||
request_timeout := ReqTimeout
|
||||
} = Conf
|
||||
) ->
|
||||
) when Type == webhook orelse Type == <<"webhook">> ->
|
||||
{BaseUrl, Path} = parse_url(Url),
|
||||
{ok, BaseUrl2} = emqx_http_lib:uri_parse(BaseUrl),
|
||||
Conf#{
|
||||
|
@ -262,7 +262,7 @@ parse_confs(
|
|||
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)
|
||||
->
|
||||
case emqx_connector:parse_connector_id(ConnId) of
|
||||
|
@ -278,7 +278,7 @@ parse_confs(Type = mqtt, Name, #{connector := ConnId, direction := Direction} =
|
|||
{_ConnType, _ConnName} ->
|
||||
error({cannot_use_connector_with_different_type, ConnId})
|
||||
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)
|
||||
->
|
||||
make_resource_confs(
|
||||
|
@ -288,16 +288,8 @@ parse_confs(Type = mqtt, Name, #{connector := ConnectorConfs, direction := Direc
|
|||
Type,
|
||||
Name
|
||||
);
|
||||
parse_confs(Type, Name, Conf) ->
|
||||
parse_enterprise_confs(Type, Name, 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.
|
||||
parse_confs(_Type, _Name, Conf) ->
|
||||
Conf.
|
||||
|
||||
make_resource_confs(ingress, ConnectorConfs, BridgeConf, Type, Name) ->
|
||||
BName = bridge_id(Type, Name),
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
schema_modules/0,
|
||||
conn_bridge_examples/1,
|
||||
resource_type/1,
|
||||
parse_conf/3,
|
||||
fields/1
|
||||
]).
|
||||
|
||||
|
@ -27,14 +26,11 @@ conn_bridge_examples(Method) ->
|
|||
resource_type(hstream) -> emqx_ee_connector_hstream;
|
||||
resource_type(<<"hstream">>) -> emqx_ee_connector_hstream.
|
||||
|
||||
parse_conf(_Type, _Name, Conf) ->
|
||||
Conf.
|
||||
|
||||
fields(bridges) ->
|
||||
[
|
||||
{hstream,
|
||||
mk(
|
||||
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 {
|
||||
url {
|
||||
desc {
|
||||
en: """Hstream Server URL"""
|
||||
en: """HStream Server URL"""
|
||||
zh: """HStream 服务器 URL"""
|
||||
}
|
||||
label {
|
||||
en: """Hstream Server URL"""
|
||||
en: """HStream Server URL"""
|
||||
zh: """HStream 服务器 URL"""
|
||||
}
|
||||
}
|
||||
stream_name {
|
||||
desc {
|
||||
en: """Hstream Stream Name"""
|
||||
en: """HStream Stream Name"""
|
||||
zh: """HStream 流名称"""
|
||||
}
|
||||
label {
|
||||
en: """Hstream Stream Name"""
|
||||
en: """HStream Stream Name"""
|
||||
zh: """HStream 流名称"""
|
||||
}
|
||||
}
|
||||
ordering_key {
|
||||
desc {
|
||||
en: """Hstream Ordering Key"""
|
||||
en: """HStream Ordering Key"""
|
||||
zh: """HStream 分区键"""
|
||||
}
|
||||
label {
|
||||
en: """Hstream Ordering Key"""
|
||||
en: """HStream Ordering Key"""
|
||||
zh: """HStream 分区键"""
|
||||
}
|
||||
}
|
||||
pool_size {
|
||||
desc {
|
||||
en: """Hstream Pool Size"""
|
||||
en: """HStream Pool Size"""
|
||||
zh: """HStream 连接池大小"""
|
||||
}
|
||||
label {
|
||||
en: """Hstream Pool Size"""
|
||||
en: """HStream Pool Size"""
|
||||
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,
|
||||
github: "ninenines/ranch", ref: "a692f44567034dacf5efcaa24a24183788594eb7", override: true},
|
||||
# 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()
|
||||
end
|
||||
|
||||
|
@ -215,7 +216,9 @@ defmodule EMQXUmbrella.MixProject do
|
|||
if(edition_type == :enterprise,
|
||||
do: [
|
||||
emqx_license: :permanent,
|
||||
emqx_enterprise_conf: :load
|
||||
emqx_enterprise_conf: :load,
|
||||
emqx_ee_connector: :permanent,
|
||||
emqx_ee_bridge: :permanent
|
||||
],
|
||||
else: []
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue