Переглянути джерело

chore: fix the documentation generation and example conf checking

JianBo He 2 роки тому
батько
коміт
7bd5579980

+ 3 - 1
apps/emqx_gateway/src/emqx_gateway_utils.erl

@@ -748,7 +748,9 @@ ensure_gateway_loaded() ->
             emqx_gateway_stomp,
             emqx_gateway_coap,
             emqx_gateway_lwm2m,
-            emqx_gateway_mqttsn
+            emqx_gateway_mqttsn,
+            emqx_gateway_gbt32960,
+            emqx_gateway_ocpp
         ]
     ).
 

+ 6 - 6
apps/emqx_gateway_exproto/test/emqx_exproto_SUITE.erl

@@ -636,18 +636,18 @@ close({dtls, Sock}) ->
 %% Server-Opts
 
 socketopts(tcp) ->
-    #{tcp => tcp_opts()};
+    #{tcp_options => tcp_opts()};
 socketopts(ssl) ->
     #{
-        tcp => tcp_opts(),
-        ssl => ssl_opts()
+        tcp_options => tcp_opts(),
+        ssl_options => ssl_opts()
     };
 socketopts(udp) ->
-    #{udp => udp_opts()};
+    #{udp_options => udp_opts()};
 socketopts(dtls) ->
     #{
-        udp => udp_opts(),
-        dtls => dtls_opts()
+        udp_options => udp_opts(),
+        dtls_options => dtls_opts()
     }.
 
 tcp_opts() ->

+ 1 - 1
apps/emqx_gateway_ocpp/src/emqx_ocpp_schema.erl

@@ -88,7 +88,7 @@ fields(upstream) ->
         {topic_override_mapping,
             sc(
                 %% XXX: more clearly type defination
-                hoconsc:map(string(), string()),
+                hoconsc:map(name, string()),
                 #{
                     required => false,
                     default => #{},

+ 28 - 0
rel/config/ee-examples/gateway.gbt32960.conf.example

@@ -0,0 +1,28 @@
+##--------------------------------------------------------------------
+## Gateway GB/T 32960
+##
+## Add a GB/T 32960 gateway
+##--------------------------------------------------------------------
+## Note: This is an example of how to configure this feature
+##       you should copy and paste the below data into the emqx.conf for working
+
+gateway.gbt32960 {
+
+    ## When publishing or subscribing, prefix all topics with a mountpoint string.
+    ## It's a way that you can use to implement isolation of message routing between different
+    ## gateway protocols
+    mountpoint = "gbt32960/"
+
+    ## Re-send time interval
+    retry_interval = "8s"
+
+    ## Re-send max times
+    max_retry_times = 3
+
+    ## Max message queue length
+    message_queue_len = 10
+
+    listeners.tcp.default {
+        bind = "0.0.0.0:7325"
+    }
+}