Fix schema bug
This commit is contained in:
parent
b51747f03e
commit
076f3e3068
|
@ -779,16 +779,6 @@ listener.tcp.external.active_n = 100
|
||||||
## Value: String
|
## Value: String
|
||||||
listener.tcp.external.zone = external
|
listener.tcp.external.zone = external
|
||||||
|
|
||||||
## Mountpoint of the MQTT/TCP Listener. All the topics will be prefixed
|
|
||||||
## with the mountpoint path if this option is enabled.
|
|
||||||
##
|
|
||||||
## Variables in mountpoint path:
|
|
||||||
## - %c: clientid
|
|
||||||
## - %u: username
|
|
||||||
##
|
|
||||||
## Value: String
|
|
||||||
## listener.tcp.external.mountpoint = devicebound/
|
|
||||||
|
|
||||||
## Rate limit for the external MQTT/TCP connections. Format is 'rate,burst'.
|
## Rate limit for the external MQTT/TCP connections. Format is 'rate,burst'.
|
||||||
##
|
##
|
||||||
## Value: rate,burst
|
## Value: rate,burst
|
||||||
|
@ -918,13 +908,6 @@ listener.tcp.internal.active_n = 1000
|
||||||
## Value: String
|
## Value: String
|
||||||
listener.tcp.internal.zone = internal
|
listener.tcp.internal.zone = internal
|
||||||
|
|
||||||
## Mountpoint of the MQTT/TCP Listener.
|
|
||||||
##
|
|
||||||
## See: listener.tcp.$name.mountpoint
|
|
||||||
##
|
|
||||||
## Value: String
|
|
||||||
## listener.tcp.internal.mountpoint = internal/
|
|
||||||
|
|
||||||
## Rate limit for the internal MQTT/TCP connections.
|
## Rate limit for the internal MQTT/TCP connections.
|
||||||
##
|
##
|
||||||
## See: listener.tcp.$name.rate_limit
|
## See: listener.tcp.$name.rate_limit
|
||||||
|
@ -1030,11 +1013,6 @@ listener.ssl.external.active_n = 100
|
||||||
## Value: String
|
## Value: String
|
||||||
listener.ssl.external.zone = external
|
listener.ssl.external.zone = external
|
||||||
|
|
||||||
## Mountpoint of the MQTT/SSL Listener.
|
|
||||||
##
|
|
||||||
## Value: String
|
|
||||||
## listener.ssl.external.mountpoint = devicebound/
|
|
||||||
|
|
||||||
## The access control rules for the MQTT/SSL listener.
|
## The access control rules for the MQTT/SSL listener.
|
||||||
##
|
##
|
||||||
## See: listener.tcp.$name.access
|
## See: listener.tcp.$name.access
|
||||||
|
@ -1281,13 +1259,6 @@ listener.ws.external.max_conn_rate = 1000
|
||||||
## Value: String
|
## Value: String
|
||||||
listener.ws.external.zone = external
|
listener.ws.external.zone = external
|
||||||
|
|
||||||
## Mountpoint of the MQTT/WebSocket Listener.
|
|
||||||
##
|
|
||||||
## See: listener.tcp.$name.mountpoint
|
|
||||||
##
|
|
||||||
## Value: String
|
|
||||||
## listener.ws.external.mountpoint = devicebound/
|
|
||||||
|
|
||||||
## The access control for the MQTT/WebSocket listener.
|
## The access control for the MQTT/WebSocket listener.
|
||||||
##
|
##
|
||||||
## See: listener.tcp.$name.access
|
## See: listener.tcp.$name.access
|
||||||
|
@ -1427,13 +1398,6 @@ listener.wss.external.max_conn_rate = 1000
|
||||||
## Value: String
|
## Value: String
|
||||||
listener.wss.external.zone = external
|
listener.wss.external.zone = external
|
||||||
|
|
||||||
## Mountpoint of the MQTT/WebSocket/SSL Listener.
|
|
||||||
##
|
|
||||||
## See: listener.tcp.$name.mountpoint
|
|
||||||
##
|
|
||||||
## Value: String
|
|
||||||
## listener.wss.external.mountpoint = devicebound/
|
|
||||||
|
|
||||||
## The access control rules for the MQTT/WebSocket/SSL listener.
|
## The access control rules for the MQTT/WebSocket/SSL listener.
|
||||||
##
|
##
|
||||||
## See: listener.tcp.$name.access.<no>
|
## See: listener.tcp.$name.access.<no>
|
||||||
|
|
|
@ -866,15 +866,16 @@ end}.
|
||||||
{force_shutdown_policy, ShutdownPolicy};
|
{force_shutdown_policy, ShutdownPolicy};
|
||||||
("mqueue_priorities", Val) ->
|
("mqueue_priorities", Val) ->
|
||||||
case Val of
|
case Val of
|
||||||
"none" -> none; % NO_PRIORITY_TABLE
|
"none" -> {mqueue_priorities, none}; % NO_PRIORITY_TABLE
|
||||||
_ ->
|
_ ->
|
||||||
lists:foldl(fun(T, Acc) ->
|
MqueuePriorities = lists:foldl(fun(T, Acc) ->
|
||||||
%% NOTE: space in "= " is intended
|
%% NOTE: space in "= " is intended
|
||||||
[{Topic, Prio}] = string:tokens(T, "= "),
|
[Topic, Prio] = string:tokens(T, "= "),
|
||||||
P = list_to_integer(Prio),
|
P = list_to_integer(Prio),
|
||||||
(P < 0 orelse P > 255) andalso error({bad_priority, Topic, Prio}),
|
(P < 0 orelse P > 255) andalso error({bad_priority, Topic, Prio}),
|
||||||
maps:put(iolist_to_binary(Topic), P, Acc)
|
maps:put(iolist_to_binary(Topic), P, Acc)
|
||||||
end, string:tokens(Val, ","))
|
end, #{}, string:tokens(Val, ",")),
|
||||||
|
{mqueue_priorities, MqueuePriorities}
|
||||||
end;
|
end;
|
||||||
("mountpoint", Val) ->
|
("mountpoint", Val) ->
|
||||||
{mountpoint, iolist_to_binary(Val)};
|
{mountpoint, iolist_to_binary(Val)};
|
||||||
|
@ -924,10 +925,6 @@ end}.
|
||||||
{datatype, string}
|
{datatype, string}
|
||||||
]}.
|
]}.
|
||||||
|
|
||||||
{mapping, "listener.tcp.$name.mountpoint", "emqx.listeners", [
|
|
||||||
{datatype, string}
|
|
||||||
]}.
|
|
||||||
|
|
||||||
{mapping, "listener.tcp.$name.rate_limit", "emqx.listeners", [
|
{mapping, "listener.tcp.$name.rate_limit", "emqx.listeners", [
|
||||||
{default, undefined},
|
{default, undefined},
|
||||||
{datatype, string}
|
{datatype, string}
|
||||||
|
@ -1024,10 +1021,6 @@ end}.
|
||||||
{datatype, string}
|
{datatype, string}
|
||||||
]}.
|
]}.
|
||||||
|
|
||||||
{mapping, "listener.ssl.$name.mountpoint", "emqx.listeners", [
|
|
||||||
{datatype, string}
|
|
||||||
]}.
|
|
||||||
|
|
||||||
{mapping, "listener.ssl.$name.rate_limit", "emqx.listeners", [
|
{mapping, "listener.ssl.$name.rate_limit", "emqx.listeners", [
|
||||||
{default, undefined},
|
{default, undefined},
|
||||||
{datatype, string}
|
{datatype, string}
|
||||||
|
@ -1174,10 +1167,6 @@ end}.
|
||||||
{datatype, string}
|
{datatype, string}
|
||||||
]}.
|
]}.
|
||||||
|
|
||||||
{mapping, "listener.ws.$name.mountpoint", "emqx.listeners", [
|
|
||||||
{datatype, string}
|
|
||||||
]}.
|
|
||||||
|
|
||||||
{mapping, "listener.ws.$name.rate_limit", "emqx.listeners", [
|
{mapping, "listener.ws.$name.rate_limit", "emqx.listeners", [
|
||||||
{default, undefined},
|
{default, undefined},
|
||||||
{datatype, string}
|
{datatype, string}
|
||||||
|
@ -1280,10 +1269,6 @@ end}.
|
||||||
{datatype, string}
|
{datatype, string}
|
||||||
]}.
|
]}.
|
||||||
|
|
||||||
{mapping, "listener.wss.$name.mountpoint", "emqx.listeners", [
|
|
||||||
{datatype, string}
|
|
||||||
]}.
|
|
||||||
|
|
||||||
{mapping, "listener.wss.$name.rate_limit", "emqx.listeners", [
|
{mapping, "listener.wss.$name.rate_limit", "emqx.listeners", [
|
||||||
{datatype, string}
|
{datatype, string}
|
||||||
]}.
|
]}.
|
||||||
|
@ -1423,8 +1408,6 @@ end}.
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
|
||||||
MountPoint = fun(undefined) -> undefined; (S) -> list_to_binary(S) end,
|
|
||||||
|
|
||||||
Ratelimit = fun(undefined) ->
|
Ratelimit = fun(undefined) ->
|
||||||
undefined;
|
undefined;
|
||||||
(S) ->
|
(S) ->
|
||||||
|
@ -1442,7 +1425,6 @@ end}.
|
||||||
{rate_limit, Ratelimit(cuttlefish:conf_get(Prefix ++ ".rate_limit", Conf, undefined))},
|
{rate_limit, Ratelimit(cuttlefish:conf_get(Prefix ++ ".rate_limit", Conf, undefined))},
|
||||||
{proxy_protocol, cuttlefish:conf_get(Prefix ++ ".proxy_protocol", Conf, undefined)},
|
{proxy_protocol, cuttlefish:conf_get(Prefix ++ ".proxy_protocol", Conf, undefined)},
|
||||||
{proxy_protocol_timeout, cuttlefish:conf_get(Prefix ++ ".proxy_protocol_timeout", Conf, undefined)},
|
{proxy_protocol_timeout, cuttlefish:conf_get(Prefix ++ ".proxy_protocol_timeout", Conf, undefined)},
|
||||||
{mountpoint, MountPoint(cuttlefish:conf_get(Prefix ++ ".mountpoint", Conf, undefined))},
|
|
||||||
{verify_protocol_header, cuttlefish:conf_get(Prefix ++ ".verify_protocol_header", Conf, undefined)},
|
{verify_protocol_header, cuttlefish:conf_get(Prefix ++ ".verify_protocol_header", Conf, undefined)},
|
||||||
{peer_cert_as_username, cuttlefish:conf_get(Prefix ++ ".peer_cert_as_username", Conf, undefined)},
|
{peer_cert_as_username, cuttlefish:conf_get(Prefix ++ ".peer_cert_as_username", Conf, undefined)},
|
||||||
{proxy_port_header, cuttlefish:conf_get(Prefix ++ ".proxy_port_header", Conf, undefined)},
|
{proxy_port_header, cuttlefish:conf_get(Prefix ++ ".proxy_port_header", Conf, undefined)},
|
||||||
|
|
Loading…
Reference in New Issue