emqx/rel/i18n/emqx_gateway_schema.hocon

256 lines
8.9 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

emqx_gateway_schema {
gateway_common_enable {
desc {
en: """Whether to enable this gateway"""
zh: """是否启用该网关"""
}
}
gateway_common_enable_stats {
desc {
en: """Whether to enable client process statistic"""
zh: """是否开启客户端统计"""
}
}
gateway_common_idle_timeout {
desc {
en: """The idle time of the client connection process. It has two purposes:
1. A newly created client process that does not receive any client requests after that time will be closed directly.
2. A running client process that does not receive any client requests after this time will go into hibernation to save resources."""
zh: """客户端连接过程的空闲时间。该配置用于:
1. 一个新创建的客户端进程如果在该时间间隔内没有收到任何客户端请求,将被直接关闭。
2. 一个正在运行的客户进程如果在这段时间后没有收到任何客户请求,将进入休眠状态以节省资源。"""
}
}
gateway_common_clientinfo_override {
desc {
en: """ClientInfo override."""
zh: """ClientInfo 重写。"""
}
}
gateway_common_clientinfo_override_username {
desc {
en: """Template for overriding username."""
zh: """username 重写模板"""
}
}
gateway_common_clientinfo_override_password {
desc {
en: """Template for overriding password."""
zh: """password 重写模板"""
}
}
gateway_common_clientinfo_override_clientid {
desc {
en: """Template for overriding clientid."""
zh: """clientid 重写模板"""
}
}
gateway_common_authentication {
desc {
en: """Default authentication configs for all the gateway listeners. For per-listener overrides see <code>authentication</code>\n in listener configs"""
zh: """网关的认证器配置,对该网关下所以的监听器生效。如果每个监听器需要配置不同的认证器,需要配置监听器下的 <code>authentication</code> 字段。"""
}
}
tcp_udp_listeners {
desc {
en: """Settings for the listeners."""
zh: """监听器配置。"""
}
}
tcp_listeners {
desc {
en: """Settings for the TCP listeners."""
zh: """配置 TCP 类型的监听器。"""
}
}
udp_listeners {
desc {
en: """Settings for the UDP listeners."""
zh: """配置 UDP 类型的监听器。"""
}
}
listener_name_to_settings_map{
desc {
en: """A map from listener names to listener settings."""
zh: """从监听器名称到配置参数的映射。"""
}
}
tcp_listener_acceptors {
desc {
en: """Size of the acceptor pool."""
zh: """Acceptor 进程池大小。"""
}
}
tcp_listener_tcp_opts{
desc {
en: """Setting the TCP socket options."""
zh: """TCP Socket 配置。"""
}
}
tcp_listener_proxy_protocol {
desc {
en: """Enable the Proxy Protocol V1/2 if the EMQX cluster is deployed behind HAProxy or Nginx.
See: https://www.haproxy.com/blog/haproxy/proxy-protocol/"""
zh: """是否开启 Proxy Protocol V1/2。当 EMQX 集群部署在 HAProxy 或 Nginx 后需要获取客户端真实 IP 时常用到该选项。参考https://www.haproxy.com/blog/haproxy/proxy-protocol/"""
}
}
tcp_listener_proxy_protocol_timeout {
desc {
en: """Timeout for proxy protocol.
EMQX will close the TCP connection if proxy protocol packet is not received within the timeout."""
zh: """接收 Proxy Protocol 报文头的超时时间。如果在超时内没有收到 Proxy Protocol 包EMQX 将关闭 TCP 连接。"""
}
}
ssl_listener_options {
desc {
en: """SSL Socket options."""
zh: """SSL Socket 配置。"""
}
}
udp_listener_udp_opts {
desc {
en: """Settings for the UDP sockets."""
zh: """UDP Socket 配置。"""
}
}
udp_listener_active_n {
desc {
en: """Specify the {active, N} option for the socket.
See: https://erlang.org/doc/man/inet.html#setopts-2"""
zh: """为 Socket 指定 {active, N} 选项。
参见https://erlang.org/doc/man/inet.html#setopts-2"""
}
}
udp_listener_recbuf {
desc {
en: """Size of the kernel-space receive buffer for the socket."""
zh: """Socket 在内核空间接收缓冲区的大小。"""
}
}
udp_listener_sndbuf {
desc {
en: """Size of the kernel-space send buffer for the socket."""
zh: """Socket 在内核空间发送缓冲区的大小。"""
}
}
udp_listener_buffer {
desc {
en: """Size of the user-space buffer for the socket."""
zh: """Socket 在用户空间的缓冲区大小。"""
}
}
udp_listener_reuseaddr {
desc {
en: """Allow local reuse of port numbers."""
zh: """允许重用本地处于 TIME_WAIT 的端口号。"""
}
}
dtls_listener_acceptors {
desc {
en: """Size of the acceptor pool."""
zh: """Acceptor 进程池大小。"""
}
}
dtls_listener_dtls_opts {
desc {
en: """DTLS socket options"""
zh: """DTLS Socket 配置"""
}
}
gateway_common_listener_enable {
desc {
en: """Enable the listener."""
zh: """是否启用该监听器。"""
}
}
gateway_common_listener_bind {
desc {
en: """The IP address and port that the listener will bind."""
zh: """监听器绑定的 IP 地址或端口。"""
}
}
gateway_common_listener_max_connections {
desc {
en: """Maximum number of concurrent connections."""
zh: """监听器支持的最大连接数。"""
}
}
gateway_common_listener_max_conn_rate {
desc {
en: """Maximum connections per second."""
zh: """监听器支持的最大连接速率。"""
}
}
gateway_common_listener_enable_authn {
desc {
en: """Set <code>true</code> (default) to enable client authentication on this listener.
When set to <code>false</code> clients will be allowed to connect without authentication."""
zh: """配置 <code>true</code> (默认值)启用客户端进行身份认证。
配置 <code>false</code> 时,将不对客户端做任何认证。"""
}
}
gateway_mountpoint {
desc {
en: """When publishing or subscribing, prefix all topics with a mountpoint string.
The prefixed string will be removed from the topic name when the message is delivered to the subscriber.
The mountpoint is a way that users can use to implement isolation of message routing between different listeners.
For example if a client A subscribes to `t` with `listeners.tcp.\<name>.mountpoint` set to `some_tenant`,
then the client actually subscribes to the topic `some_tenant/t`.
Similarly, if another client B (connected to the same listener as the client A) sends a message to topic `t`,
the message is routed to all the clients subscribed `some_tenant/t`,
so client A will receive the message, with topic name `t`. Set to `\"\"` to disable the feature.
Variables in mountpoint string:<br/>
- <code>${clientid}</code>: clientid<br/>
- <code>${username}</code>: username"""
zh: """发布或订阅时,在所有主题前增加前缀字符串。
当消息投递给订阅者时,前缀字符串将从主题名称中删除。挂载点是用户可以用来实现不同监听器之间的消息路由隔离的一种方式。
例如,如果客户端 A 在 `listeners.tcp.\<name>.mountpoint` 设置为 `some_tenant` 的情况下订阅 `t`
则客户端实际上订阅了 `some_tenant/t` 主题。
类似地,如果另一个客户端 B连接到与客户端 A 相同的侦听器)向主题 `t` 发送消息,
则该消息被路由到所有订阅了 `some_tenant/t` 的客户端,因此客户端 A 将收到该消息,带有 主题名称`t`。 设置为 `\"\"` 以禁用该功能。
挂载点字符串中可用的变量:<br/>
- <code>${clientid}</code>clientid<br/>
- <code>${username}</code>:用户名"""
}
}
gateway_common_listener_access_rules {
desc {
en: """The access control rules for this listener.
See: https://github.com/emqtt/esockd#allowdeny"""
zh: """配置监听器的访问控制规则。
https://github.com/emqtt/esockd#allowdeny"""
}
}
}