Просмотр исходного кода

Merge pull request #10368 from HJianBo/improve-gateway-readme

docs: update gateway README
JianBo He 3 лет назад
Родитель
Сommit
1759dd1157
1 измененных файлов с 44 добавлено и 19 удалено
  1. 44 19
      apps/emqx_gateway/README.md

+ 44 - 19
apps/emqx_gateway/README.md

@@ -1,6 +1,6 @@
-# emqx_gateway
+# Gateway
 
-EMQX Gateway is an application that managing all gateways in EMQX.
+EMQX Gateway is an application framework that manages all gateways within EMQX.
 
 It provides a set of standards to define how to implement a certain type of
 protocol access on EMQX. For example:
@@ -11,26 +11,50 @@ protocol access on EMQX. For example:
 - Configuration & Schema
 - HTTP/CLI management interfaces
 
-There are some standard implementations available, such as [Stomp](../emqx_stomp/README.md),
-[MQTT-SN](../emqx_mqttsn/README.md), [CoAP](../emqx_coap/README.md),
-and [LwM2M](../emqx_lwm2m/README.md) gateway.
-
-The emqx_gateway application depends on `emqx`, `emqx_authn`, `emqx_ctl` that
+The emqx_gateway application depends on `emqx`, `emqx_authn`, `emqx_authz`, `emqx_ctl` that
 provide the foundation for protocol access.
 
-## Three ways to create your gateway
+More introduction: [Extended Protocol Gateway](https://www.emqx.io/docs/en/v5.0/gateway/gateway.html)
+
+## Usage
+
+This application is just a Framework, we provide some standard implementations,
+such as [Stomp](../emqx_stomp/README.md), [MQTT-SN](../emqx_mqttsn/README.md),
+[CoAP](../emqx_coap/README.md) and [LwM2M](../emqx_lwm2m/README.md) gateway.
+
+These applications are all packaged by default in the EMQX distribution. If you
+need to start a certain gateway, you only need to enable it via
+Dashboard, HTTP API or emqx.conf file.
+
+For instance, enable the Stomp gateway in emqx.conf:
+```hocon
+gateway.stomp {
+
+  mountpoint = "stomp/"
+
+  listeners.tcp.default {
+    bind = 61613
+    acceptors = 16
+    max_connections = 1024000
+    max_conn_rate = 1000
+  }
+}
+```
 
-## Raw Erlang Application
+## How to develop your Gateway application
+
+There are three ways to develop a Gateway application to accept your private protocol
+clients.
+
+### Raw Erlang Application
 
 This approach is the same as in EMQX 4.x. You need to implement an Erlang application,
-which is packaged in EMQX as a [Plugin](todo) or as a source code dependency.
+which is packaged in EMQX as a Plugin or as a source code dependency.
 In this approach, you do not need to respect any specifications of emqx_gateway,
 and you can freely implement the features you need.
 
 
-Steps guide: [Implement Gateway via Raw Application](doc/implement_gateway_via_raw_appliction.md)
-
-## Respect emqx_gateway framework
+### Respect emqx_gateway framework
 
 Similar to the first approach, you still need to implement an application using Erlang
 and package it into EMQX.
@@ -41,9 +65,7 @@ This is the approach we recommend. In this approach, your implementation can be
 by the emqx_gateway framework, even if it may require you to understand more details about it.
 
 
-Steps guide: [Implement Gateway via Gateway framework](doc/implement_gateway_via_gateway_framekwork.md)
-
-## Use ExProto Gateway (Non-Erlang developers)
+### Use ExProto Gateway (Non-Erlang developers)
 
 If you want to implement your gateway using other programming languages such as
 Java, Python, Go, etc.
@@ -51,8 +73,11 @@ Java, Python, Go, etc.
 You need to implement a gRPC service in the other programming language to parse
 your device protocol and integrate it with EMQX.
 
-Refer to: [ExProto Gateway](../emqx_exproto/README.md)
 
-## Cookbook for emqx_gateway framework
+## Contributing
+
+Please see our [contributing.md](../../CONTRIBUTING.md).
+
+## License
 
-*WIP*
+See [LICENSE](../../APL.txt)