fix: kafka bridge schema

This commit is contained in:
Zaiming (Stone) Shi 2022-09-12 10:51:35 +02:00
parent f0e03086a6
commit e45c99bf79
2 changed files with 19 additions and 6 deletions

View File

@ -219,7 +219,7 @@ emqx_ee_bridge_kafka {
socket_nodelay { socket_nodelay {
desc { desc {
en: "When set to 'true', TCP buffer sent as soon as possible. " en: "When set to 'true', TCP buffer sent as soon as possible. "
"Otherwise the OS kernel may buffer small TCP packets for a while (40ms by default)." "Otherwise, the OS kernel may buffer small TCP packets for a while (40 ms by default)."
zh: "设置 true' 让系统内核立即发送。否则当需要发送当内容很少时,可能会有一定延迟(默认 40 毫秒)。" zh: "设置 true' 让系统内核立即发送。否则当需要发送当内容很少时,可能会有一定延迟(默认 40 毫秒)。"
} }
label { label {

View File

@ -245,8 +245,21 @@ desc("config") ->
?DESC("desc_config"); ?DESC("desc_config");
desc(Method) when Method =:= "get"; Method =:= "put"; Method =:= "post" -> desc(Method) when Method =:= "get"; Method =:= "put"; Method =:= "post" ->
["Configuration for Kafka using `", string:to_upper(Method), "` method."]; ["Configuration for Kafka using `", string:to_upper(Method), "` method."];
desc(_) -> desc(Name) ->
undefined. lists:member(Name, struct_names()) orelse throw({missing_desc, Name}),
?DESC(Name).
struct_names() ->
[
auth_gssapi_kerberos,
auth_username_password,
kafka_message,
producer_buffer,
producer_kafka_opts,
producer_mqtt_opts,
socket_opts,
producer_opts
].
%% ------------------------------------------------------------------------------------------------- %% -------------------------------------------------------------------------------------------------
%% internal %% internal