spacewander commented on code in PR #8050: URL: https://github.com/apache/apisix/pull/8050#discussion_r990938572
##########
apisix/plugins/kafka-logger.lua:
##########
@@ -68,6 +68,19 @@ local schema = {
maximum = 65535,
description = "the port of kafka broker",
},
+ sasl_config = {
+ type = "object",
+ description = "sasl config",
+ properties = {
+ mechanism = {
+ type = "string",
+ default = "PLAIN"
Review Comment:
We can use enum to make sure the passing mechanism is legal? Although only
`PLAIN` is currently supported.
##########
docs/en/latest/plugins/kafka-logger.md:
##########
@@ -41,6 +41,10 @@ It might take some time to receive the log data. It will be
automatically sent a
| brokers | array | True | |
| List of Kafka brokers (nodes).
|
| brokers.host | string | True | |
| The host of Kafka broker, e.g, `192.168.1.1`.
|
| brokers.port | integer | True | | [0, 65535]
| The port of Kafka broker
|
+| brokers.sasl_config | object | False | |
| The sasl config of Kafka broker
|
+| brokers.sasl_config.mechanism | string | False | "PLAIN" |
["PLAIN"] | The mechaism of sasl config
|
+| brokers.sasl_config.user | string | True | |
| The user of sasl_config.If sasl_config exists, it's
required.
|
Review Comment:
```suggestion
| brokers.sasl_config.user | string | True | |
| The user of sasl_config. If sasl_config exists, it's
required.
|
```
##########
docs/zh/latest/plugins/kafka-logger.md:
##########
@@ -39,6 +39,10 @@ description: API 网关 Apache APISIX 的 kafka-logger 插件用于将日志作
| brokers | array | 是 | |
| 需要推送的 Kafka 的 broker 列表。 |
| brokers.host | string | 是 | |
| Kafka broker 的节点 host 配置,例如 `192.168.1.1` |
| brokers.port | string | 是 | |
| Kafka broker 的节点端口配置 |
+| brokers.sasl_config | object | 否 | |
| Kafka broker 中的 sasl_config |
+| brokers.sasl_config.mechanism | string | 否 | "PLAIN" |
["PLAIN"] | Kafka broker 中的 sasl 认证机制 |
+| brokers.sasl_config.user | string | 是 | |
| Kafka broker 中 sasl 配置中的 user, 如果 sasl_config 存在,则必须填写 |
Review Comment:
```suggestion
| brokers.sasl_config.user | string | 是 | |
| Kafka broker 中 sasl 配置中的 user,如果 sasl_config 存在,则必须填写 |
```
##########
docs/en/latest/plugins/kafka-logger.md:
##########
@@ -41,6 +41,10 @@ It might take some time to receive the log data. It will be
automatically sent a
| brokers | array | True | |
| List of Kafka brokers (nodes).
|
| brokers.host | string | True | |
| The host of Kafka broker, e.g, `192.168.1.1`.
|
| brokers.port | integer | True | | [0, 65535]
| The port of Kafka broker
|
+| brokers.sasl_config | object | False | |
| The sasl config of Kafka broker
|
+| brokers.sasl_config.mechanism | string | False | "PLAIN" |
["PLAIN"] | The mechaism of sasl config
|
+| brokers.sasl_config.user | string | True | |
| The user of sasl_config.If sasl_config exists, it's
required.
|
+| brokers.sasl_config.password | string | True | |
| The password of sasl_config.If sasl_config exists, it's
required.
|
Review Comment:
```suggestion
| brokers.sasl_config.password | string | True | |
| The password of sasl_config. If sasl_config exists, it's
required.
|
```
##########
docs/zh/latest/plugins/kafka-logger.md:
##########
@@ -39,6 +39,10 @@ description: API 网关 Apache APISIX 的 kafka-logger 插件用于将日志作
| brokers | array | 是 | |
| 需要推送的 Kafka 的 broker 列表。 |
| brokers.host | string | 是 | |
| Kafka broker 的节点 host 配置,例如 `192.168.1.1` |
| brokers.port | string | 是 | |
| Kafka broker 的节点端口配置 |
+| brokers.sasl_config | object | 否 | |
| Kafka broker 中的 sasl_config |
+| brokers.sasl_config.mechanism | string | 否 | "PLAIN" |
["PLAIN"] | Kafka broker 中的 sasl 认证机制 |
+| brokers.sasl_config.user | string | 是 | |
| Kafka broker 中 sasl 配置中的 user, 如果 sasl_config 存在,则必须填写 |
+| brokers.sasl_config.password | string | 是 | |
| Kafka broker 中 sasl 配置中的 password, 如果 sasl_config 存在,则必须填写 |
Review Comment:
```suggestion
| brokers.sasl_config.password | string | 是 | |
| Kafka broker 中 sasl 配置中的 password,如果 sasl_config 存在,则必须填写 |
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
