fix: remove all mentions of UDP support for InfluxDB EE bridge
The InfluxDB EE bridge doesn't support the UDP protocol, but it is defined in the schema. This commit removes all such traces in the schema.
This commit is contained in:
parent
4eb4430fe2
commit
843ed464d5
|
@ -31,12 +31,6 @@
|
|||
|
||||
conn_bridge_examples(Method) ->
|
||||
[
|
||||
#{
|
||||
<<"influxdb_udp">> => #{
|
||||
summary => <<"InfluxDB UDP Bridge">>,
|
||||
value => values("influxdb_udp", Method)
|
||||
}
|
||||
},
|
||||
#{
|
||||
<<"influxdb_api_v1">> => #{
|
||||
summary => <<"InfluxDB HTTP API V1 Bridge">>,
|
||||
|
@ -71,12 +65,6 @@ values("influxdb_api_v1", post) ->
|
|||
server => <<"127.0.0.1:8086">>
|
||||
},
|
||||
values(common, "influxdb_api_v1", SupportUint, TypeOpts);
|
||||
values("influxdb_udp", post) ->
|
||||
SupportUint = <<>>,
|
||||
TypeOpts = #{
|
||||
server => <<"127.0.0.1:8089">>
|
||||
},
|
||||
values(common, "influxdb_udp", SupportUint, TypeOpts);
|
||||
values(Protocol, put) ->
|
||||
values(Protocol, post).
|
||||
|
||||
|
@ -106,26 +94,20 @@ namespace() -> "bridge_influxdb".
|
|||
|
||||
roots() -> [].
|
||||
|
||||
fields("post_udp") ->
|
||||
method_fileds(post, influxdb_udp);
|
||||
fields("post_api_v1") ->
|
||||
method_fileds(post, influxdb_api_v1);
|
||||
fields("post_api_v2") ->
|
||||
method_fileds(post, influxdb_api_v2);
|
||||
fields("put_udp") ->
|
||||
method_fileds(put, influxdb_udp);
|
||||
fields("put_api_v1") ->
|
||||
method_fileds(put, influxdb_api_v1);
|
||||
fields("put_api_v2") ->
|
||||
method_fileds(put, influxdb_api_v2);
|
||||
fields("get_udp") ->
|
||||
method_fileds(get, influxdb_udp);
|
||||
fields("get_api_v1") ->
|
||||
method_fileds(get, influxdb_api_v1);
|
||||
fields("get_api_v2") ->
|
||||
method_fileds(get, influxdb_api_v2);
|
||||
fields(Type) when
|
||||
Type == influxdb_udp orelse Type == influxdb_api_v1 orelse Type == influxdb_api_v2
|
||||
Type == influxdb_api_v1 orelse Type == influxdb_api_v2
|
||||
->
|
||||
influxdb_bridge_common_fields() ++
|
||||
connector_fields(Type).
|
||||
|
@ -164,8 +146,6 @@ desc("config") ->
|
|||
?DESC("desc_config");
|
||||
desc(Method) when Method =:= "get"; Method =:= "put"; Method =:= "post" ->
|
||||
["Configuration for InfluxDB using `", string:to_upper(Method), "` method."];
|
||||
desc(influxdb_udp) ->
|
||||
?DESC(emqx_ee_connector_influxdb, "influxdb_udp");
|
||||
desc(influxdb_api_v1) ->
|
||||
?DESC(emqx_ee_connector_influxdb, "influxdb_api_v1");
|
||||
desc(influxdb_api_v2) ->
|
||||
|
|
|
@ -28,24 +28,14 @@ The InfluxDB default port 8086 is used if `[:Port]` is not specified.
|
|||
}
|
||||
protocol {
|
||||
desc {
|
||||
en: """InfluxDB's protocol. UDP or HTTP API or HTTP API V2."""
|
||||
zh: """InfluxDB 协议。UDP 或 HTTP API 或 HTTP API V2。"""
|
||||
en: """InfluxDB's protocol. HTTP API or HTTP API V2."""
|
||||
zh: """InfluxDB 协议。HTTP API 或 HTTP API V2。"""
|
||||
}
|
||||
label {
|
||||
en: """Protocol"""
|
||||
zh: """协议"""
|
||||
}
|
||||
}
|
||||
influxdb_udp {
|
||||
desc {
|
||||
en: """InfluxDB's UDP protocol."""
|
||||
zh: """InfluxDB UDP 协议。"""
|
||||
}
|
||||
label {
|
||||
en: """UDP Protocol"""
|
||||
zh: """UDP 协议"""
|
||||
}
|
||||
}
|
||||
influxdb_api_v1 {
|
||||
desc {
|
||||
en: """InfluxDB's protocol. Support InfluxDB v1.8 and before."""
|
||||
|
|
|
@ -145,7 +145,6 @@ roots() ->
|
|||
{config, #{
|
||||
type => hoconsc:union(
|
||||
[
|
||||
hoconsc:ref(?MODULE, influxdb_udp),
|
||||
hoconsc:ref(?MODULE, influxdb_api_v1),
|
||||
hoconsc:ref(?MODULE, influxdb_api_v2)
|
||||
]
|
||||
|
@ -165,8 +164,6 @@ fields(common) ->
|
|||
required => false, default => ms, desc => ?DESC("precision")
|
||||
})}
|
||||
];
|
||||
fields(influxdb_udp) ->
|
||||
fields(common);
|
||||
fields(influxdb_api_v1) ->
|
||||
fields(common) ++
|
||||
[
|
||||
|
@ -199,8 +196,6 @@ server() ->
|
|||
|
||||
desc(common) ->
|
||||
?DESC("common");
|
||||
desc(influxdb_udp) ->
|
||||
?DESC("influxdb_udp");
|
||||
desc(influxdb_api_v1) ->
|
||||
?DESC("influxdb_api_v1");
|
||||
desc(influxdb_api_v2) ->
|
||||
|
@ -326,12 +321,7 @@ protocol_config(#{
|
|||
{bucket, str(Bucket)},
|
||||
{org, str(Org)},
|
||||
{token, Token}
|
||||
] ++ ssl_config(SSL);
|
||||
%% udp config
|
||||
protocol_config(_) ->
|
||||
[
|
||||
{protocol, udp}
|
||||
].
|
||||
] ++ ssl_config(SSL).
|
||||
|
||||
ssl_config(#{enable := false}) ->
|
||||
[
|
||||
|
@ -659,10 +649,6 @@ desc_test_() ->
|
|||
{desc, _, _},
|
||||
desc(common)
|
||||
),
|
||||
?_assertMatch(
|
||||
{desc, _, _},
|
||||
desc(influxdb_udp)
|
||||
),
|
||||
?_assertMatch(
|
||||
{desc, _, _},
|
||||
desc(influxdb_api_v1)
|
||||
|
|
Loading…
Reference in New Issue