feat: make gateway and slow_subs low level and hide rule_engine
This commit is contained in:
parent
3a7d4ea29d
commit
3331af4757
|
@ -61,7 +61,7 @@ tags() ->
|
|||
[<<"Gateway">>].
|
||||
|
||||
roots() ->
|
||||
[{gateway, sc(ref(?MODULE, gateway), #{importance => ?IMPORTANCE_HIDDEN})}].
|
||||
[{gateway, sc(ref(?MODULE, gateway), #{importance => ?IMPORTANCE_LOW})}].
|
||||
|
||||
fields(gateway) ->
|
||||
lists:map(
|
||||
|
|
|
@ -532,6 +532,7 @@ default_subopts() ->
|
|||
|
||||
-spec find_gateway_definitions() -> list(gateway_def()).
|
||||
find_gateway_definitions() ->
|
||||
ensure_gateway_loaded(),
|
||||
lists:flatten(
|
||||
lists:map(
|
||||
fun(App) ->
|
||||
|
@ -617,3 +618,16 @@ plus_max_connections(infinity, _) ->
|
|||
infinity;
|
||||
plus_max_connections(A, B) when is_integer(A) andalso is_integer(B) ->
|
||||
A + B.
|
||||
|
||||
%% we need to load all gateway applications before generate doc from cli
|
||||
ensure_gateway_loaded() ->
|
||||
lists:foreach(
|
||||
fun application:load/1,
|
||||
[
|
||||
emqx_gateway_exproto,
|
||||
emqx_gateway_stomp,
|
||||
emqx_gateway_coap,
|
||||
emqx_gateway_lwm2m,
|
||||
emqx_gateway_mqttsn
|
||||
]
|
||||
).
|
||||
|
|
|
@ -38,7 +38,7 @@ namespace() -> rule_engine.
|
|||
tags() ->
|
||||
[<<"Rule Engine">>].
|
||||
|
||||
roots() -> [{"rule_engine", ?HOCON(?R_REF("rule_engine"), #{importance => ?IMPORTANCE_LOW})}].
|
||||
roots() -> [{"rule_engine", ?HOCON(?R_REF("rule_engine"), #{importance => ?IMPORTANCE_HIDDEN})}].
|
||||
|
||||
fields("rule_engine") ->
|
||||
rule_engine_settings() ++
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
namespace() -> "slow_subs".
|
||||
|
||||
roots() ->
|
||||
[{"slow_subs", ?HOCON(?R_REF("slow_subs"), #{importance => ?IMPORTANCE_HIDDEN})}].
|
||||
[{"slow_subs", ?HOCON(?R_REF("slow_subs"), #{importance => ?IMPORTANCE_LOW})}].
|
||||
|
||||
fields("slow_subs") ->
|
||||
[
|
||||
|
|
|
@ -23,7 +23,7 @@ main(_) ->
|
|||
|
||||
merge(BaseConf, Cfgs) ->
|
||||
Confs = [BaseConf | lists:map(fun read_conf/1, Cfgs)],
|
||||
infix(lists:filter(fun(I) -> iolist_size(I) > 0 end, Confs), [io_lib:nl(), io_lib:nl()]).
|
||||
infix(lists:filter(fun(I) -> iolist_size(I) > 0 end, Confs), [io_lib:nl()]).
|
||||
|
||||
read_conf(CfgFile) ->
|
||||
case filelib:is_regular(CfgFile) of
|
||||
|
|
Loading…
Reference in New Issue