Jelajahi Sumber

doc(*): fix table and links in markdown

Signed-off-by: Jiyong Huang <huangjy@emqx.io>
Jiyong Huang 3 tahun lalu
induk
melakukan
babc8df115

+ 3 - 3
docs/en_US/README.md

@@ -61,10 +61,10 @@ Join our [Slack](https://join.slack.com/t/lfedge/shared_invite/zt-7kavdtmq-SeyFz
 
 - Using JMeter MQTT plugin to send simulation data to EMQX Broker, such as: `{"temperature": 10, "humidity" : 90}`, the value of temperature and humidity are random integer between 0 - 100.
 - eKuiper subscribe from EMQX Broker, and analyze data with SQL: `SELECT * FROM demo WHERE temperature > 50 ` 
-- The analysis result are wrote to local file by using [file sink plugin](extension/native/sinks/file.md).
+- The analysis result are wrote to local file by using [file sink plugin](rules/sinks/plugin/file.md).
 
 | Devices                                        | Message # per second | CPU usage     | Memory usage |
-| ---------------------------------------------- | -------------------- | ------------- | ------------ |
+|------------------------------------------------|----------------------|---------------|--------------|
 | Raspberry Pi 3B+                               | 12k                  | sys+user: 70% | 20M          |
 | AWS t2.micro( 1 Core * 1 GB) <br />Ubuntu18.04 | 10k                  | sys+user: 25% | 20M          |
 
@@ -85,7 +85,7 @@ Join our [Slack](https://join.slack.com/t/lfedge/shared_invite/zt-7kavdtmq-SeyFz
 
 - eKuiper subscribe from EdgeX ZeroMQ message bus, and analyze data with SQL: `SELECT * FROM demo WHERE temperature > 50`. 90% of data will be filtered by the rule.
 
-- The analysis result are sent to [nop sink](./rules/sinks/nop.md), all of the result data will be ignored.
+- The analysis result are sent to [nop sink](./rules/sinks/builtin/nop.md), all of the result data will be ignored.
 
 |                                                | Message # per second | CPU usage     | Memory usage |
 | ---------------------------------------------- | -------------------- | ------------- | ------------ |

+ 3 - 3
docs/en_US/extension/native/develop/function.md

@@ -8,7 +8,7 @@ In the eKuiper SQL syntax, [many built-in functions](../../../sqls/built-in_func
 
 To develop a function for eKuiper is to implement [api.Function](https://github.com/lf-edge/ekuiper/blob/master/pkg/api/stream.go) interface and export it as a golang plugin.
 
-Before starting the development, you must [setup the environment for golang plugin](../../overview.md#setup-the-plugin-developing-environment). 
+Before starting the development, you must [setup the environment for golang plugin](../overview.md#setup-the-plugin-developing-environment). 
 
 To develop a function, the _Validate_ method is firstly to be implemented. This method will be called during SQL validation. In this method, a slice of [xsql.Expr](https://github.com/lf-edge/ekuiper/blob/master/pkg/ast/expr.go) is passed as the parameter that contains the arguments for this function in the runtime. The developer can do a validation against it to check the argument count and type etc. If validation is successful, return nil. Otherwise, return an error object.
 
@@ -30,7 +30,7 @@ The main task for a Function is to implement _exec_ method. The method will be l
 Exec(args []interface{}) (interface{}, bool)
 ```  
 
-As the function itself is a plugin, it must be in the main package. Given the function struct name is myFunction. At last of the file, the source must be exported as a symbol as below. There are [2 types of exported symbol supported](../../overview.md#plugin-development). For function extension, if there is no internal state, it is recommended to export a singleton instance.
+As the function itself is a plugin, it must be in the main package. Given the function struct name is myFunction. At last of the file, the source must be exported as a symbol as below. There are [2 types of exported symbol supported](../overview.md#plugin-development). For function extension, if there is no internal state, it is recommended to export a singleton instance.
 
 ```go
 var MyFunction myFunction
@@ -65,7 +65,7 @@ go build -trimpath -modfile extensions.mod --buildmode=plugin -o plugins/functio
 eKuiper will load plugins in the plugin folders automatically. The auto loaded function plugin assumes there is a function named the same as the plugin name. If multiple functions are exported, users need to explicitly register them to make them available. There are two ways to register the functions.
 
 1. In development environment, we recommend to build plugin .so file directly into the plugin folder so that eKuiper can auto load it. Then call [CLI register functions command](../../../operation/cli/plugins.md#register-functions) or [REST register functions API](../../../operation/restapi/plugins.md#register-functions).
-2. In production environment, [package the plugin into zip file](plugins_tutorial.md#plugin-deployment-1), then call [CLI function plugin create command](../../../operation/cli/plugins.md#create-a-plugin) or [REST function plugin create API](../../../operation/restapi/plugins.md#create-a-plugin) with functions list specified.
+2. In production environment, [package the plugin into zip file](plugins_tutorial.md#deployment), then call [CLI function plugin create command](../../../operation/cli/plugins.md#create-a-plugin) or [REST function plugin create API](../../../operation/restapi/plugins.md#create-a-plugin) with functions list specified.
 
 ## Usage
 

File diff ditekan karena terlalu besar
+ 2 - 2
docs/en_US/extension/native/develop/plugins_tutorial.md


File diff ditekan karena terlalu besar
+ 5 - 5
docs/en_US/extension/overview.md


+ 11 - 11
docs/en_US/features.md

@@ -4,17 +4,17 @@ Except core runtime and REST api, there are some features that are allowed to be
 
 ## Feature List
 
-| Feature                                                                            | Build Tag  | Description                                                                                                                                            |
-|------------------------------------------------------------------------------------|------------|--------------------------------------------------------------------------------------------------------------------------------------------------------|
-| Core                                                                               | core       | The core of eKuiper. It contains the processor and REST API for stream/table/rule, the configuration processing, the SQL parser, the rule runtime etc. |
-| [CLI](./cli/overview.md)                                                           | rpc        | The cli server                                                                                                                                         |
-| [EdgeX Foundry integration](./edgex/edgex_rule_engine_tutorial.md)                 | edgex      | The built-in edgeX source, sink and connection                                                                                                         |
-| [Native plugin](./extension/native/overview.md)                                    | plugin     | The native plugin runtime, REST API, CLI API etc.                                                                                                      |
-| [Portable plugin](./extension/portable/overview.md)                                | portable   | The portable plugin runtime, REST API, CLI API etc.                                                                                                    |
-| [External service](./extension/external/external_func.md)                          | service    | The external service runtime, REST API, CLI API etc.                                                                                                   |
-| [UI Meta API](./manager-ui/overview.md)                                            | ui         | The REST API of the metadata which is usually consumed by the ui                                                                                       |
-| [Prometheus Metrics](./operation/configuration_file.md#prometheus-configuration)   | prometheus | Support to send metrics to prometheus                                                                                                                  |
-| [Extended template functions](./rules/overview.md#functions-supported-in-template) | template   | Support additional data template function from sprig besides default go text/template functions                                                        |
+| Feature                                                                                 | Build Tag  | Description                                                                                                                                            |
+|-----------------------------------------------------------------------------------------|------------|--------------------------------------------------------------------------------------------------------------------------------------------------------|
+| Core                                                                                    | core       | The core of eKuiper. It contains the processor and REST API for stream/table/rule, the configuration processing, the SQL parser, the rule runtime etc. |
+| [CLI](./operation/cli/overview.md)                                                      | rpc        | The cli server                                                                                                                                         |
+| [EdgeX Foundry integration](./edgex/edgex_rule_engine_tutorial.md)                      | edgex      | The built-in edgeX source, sink and connection                                                                                                         |
+| [Native plugin](./extension/native/overview.md)                                         | plugin     | The native plugin runtime, REST API, CLI API etc.                                                                                                      |
+| [Portable plugin](./extension/portable/overview.md)                                     | portable   | The portable plugin runtime, REST API, CLI API etc.                                                                                                    |
+| [External service](./extension/external/external_func.md)                               | service    | The external service runtime, REST API, CLI API etc.                                                                                                   |
+| [UI Meta API](./operation/manager-ui/overview.md)                                       | ui         | The REST API of the metadata which is usually consumed by the ui                                                                                       |
+| [Prometheus Metrics](./operation/config/configuration_file.md#prometheus-configuration) | prometheus | Support to send metrics to prometheus                                                                                                                  |
+| [Extended template functions](./rules/overview.md#functions-supported-in-template)      | template   | Support additional data template function from sprig besides default go text/template functions                                                        |
 
 ## Usage
 

+ 9 - 9
docs/en_US/operation/config/authentication.md

@@ -21,15 +21,15 @@ If the token is correct, eKuiper will respond the result; otherwise, it will ret
 ### JWT payload
 The JWT Payload should use the following format
 
-|  field   | optional |  meaning  |
-|  ----  | ----  | ----  |
-| iss  | false| Issuer , must use the same name with the public key put in `etc/mgmt`|
-| aud  | false |Audience , must be `eKuiper` |
-| exp  | true |Expiration Time |
-| jti  | true |JWT ID |
-| iat  | true |Issued At |
-| nbf  | true |Not Before |
-| sub  | true |Subject |
+| field | optional | meaning                                                               |
+|-------|----------|-----------------------------------------------------------------------|
+| iss   | false    | Issuer , must use the same name with the public key put in `etc/mgmt` |
+| aud   | false    | Audience , must be `eKuiper`                                          |
+| exp   | true     | Expiration Time                                                       |
+| jti   | true     | JWT ID                                                                |
+| iat   | true     | Issued At                                                             |
+| nbf   | true     | Not Before                                                            |
+| sub   | true     | Subject                                                               |
 
 There is an example in json format
 ```json

File diff ditekan karena terlalu besar
+ 1 - 1
docs/en_US/operation/manager-ui/plugins_in_manager.md


+ 1 - 1
docs/en_US/rules/state_and_fault_tolerance.md

@@ -2,7 +2,7 @@
 
 eKuiper supports stateful rule stream. There are two kinds of states in eKuiper:
 1. Internal state for window operation and rewindable source
-2. User state exposed to extensions with stream context, check [state storage](../extension/overview.md#state-storage).
+2. User state exposed to extensions with stream context, check [state storage](../extension/native/overview.md#state-storage).
 
 ## Fault Tolerance
 

+ 17 - 17
docs/en_US/sqls/custom_functions.md

@@ -5,7 +5,7 @@ eKuiper can customize functions. For the development, compilation and use of fun
 ## echo plugin
 
 | Function | Example   | Description                     |
-| -------- | --------- | ------------------------------- |
+|----------|-----------|---------------------------------|
 | echo     | echo(avg) | Output parameter value as it is |
 
 echo(avg) example
@@ -19,7 +19,7 @@ echo(avg) example
 ## countPlusOne plugin
 
 | Function     | Example           | Description                                       |
-| ------------ | ----------------- | ------------------------------------------------- |
+|--------------|-------------------|---------------------------------------------------|
 | countPlusOne | countPlusOne(avg) | Output the value of the parameter length plus one |
 
 countPlusOne(avg) example
@@ -33,7 +33,7 @@ countPlusOne(avg) example
 ## accumulateWordCount plugin
 
 | Function            | Example                      | Description                                  |
-| ------------------- | ---------------------------- | -------------------------------------------- |
+|---------------------|------------------------------|----------------------------------------------|
 | accumulateWordCount | accumulateWordCount(avg,sep) | The function counts how many words there are |
 
 accumulateWordCount(avg,sep) example
@@ -48,10 +48,10 @@ accumulateWordCount(avg,sep) example
 
 Image processing currently only supports the formats of `png` and `jpeg` 
 
-| Function  | Example                            | Description                                                  |
-| --------- | ---------------------------------- | ------------------------------------------------------------ |
+| Function  | Example                            | Description                                                                                                                                |
+|-----------|------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------|
 | resize    | resize(avg,width, height)          | Create a scaled image with new dimensions (width, height). If width or height is set to 0, it is set to the reserved value of aspect ratio |
-| thumbnail | thumbnail(avg,maxWidth, maxHeight) | Reduce the image that retains the aspect ratio to the maximum size (maxWidth, maxHeight). |
+| thumbnail | thumbnail(avg,maxWidth, maxHeight) | Reduce the image that retains the aspect ratio to the maximum size (maxWidth, maxHeight).                                                  |
 
 resize(avg,width, height) example
 
@@ -71,18 +71,18 @@ thumbnail(avg,maxWidth, maxHeight) example
 
 ### Geohash plugin
 
-| Function              | Example                                                  | Description                                                  |
-| --------------------- | -------------------------------------------------------- | ------------------------------------------------------------ |
-| geohashEncode         | geohashEncode(la,lo float64)(string)                     | Encode latitude and longitude as a string                    |
-| geohashEncodeInt      | geohashEncodeInt(la,lo float64)(uint64)                  | Encode latitude and longitude as an unsigned integer         |
-| geohashDecode         | geohashDecode(hash string)(la,lo float64)                | Decode a string into latitude and longitude                  |
-| geohashDecodeInt      | geohashDecodeInt(hash uint64)(la,lo float64)             | Decode an unsigned integers into latitude and longitude      |
-| geohashBoundingBox    | geohashBoundingBox(hash string)(string)                  | Returns the area encoded by a string                         |
-| geohashBoundingBoxInt | geohashBoundingBoxInt(hash uint64)(string)               | Returns the area encoded by an unsigned integer              |
-| geohashNeighbor       | geohashNeighbor(hash string,direction string)(string)    | Returns the neighbor in the corresponding direction of a string (Direction list: North NorthEast East SouthEast South SouthWest West NorthWest) |
+| Function              | Example                                                  | Description                                                                                                                                                |
+|-----------------------|----------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| geohashEncode         | geohashEncode(la,lo float64)(string)                     | Encode latitude and longitude as a string                                                                                                                  |
+| geohashEncodeInt      | geohashEncodeInt(la,lo float64)(uint64)                  | Encode latitude and longitude as an unsigned integer                                                                                                       |
+| geohashDecode         | geohashDecode(hash string)(la,lo float64)                | Decode a string into latitude and longitude                                                                                                                |
+| geohashDecodeInt      | geohashDecodeInt(hash uint64)(la,lo float64)             | Decode an unsigned integers into latitude and longitude                                                                                                    |
+| geohashBoundingBox    | geohashBoundingBox(hash string)(string)                  | Returns the area encoded by a string                                                                                                                       |
+| geohashBoundingBoxInt | geohashBoundingBoxInt(hash uint64)(string)               | Returns the area encoded by an unsigned integer                                                                                                            |
+| geohashNeighbor       | geohashNeighbor(hash string,direction string)(string)    | Returns the neighbor in the corresponding direction of a string (Direction list: North NorthEast East SouthEast South SouthWest West NorthWest)            |
 | geohashNeighborInt    | geohashNeighborInt(hash uint64,direction string)(uint64) | Returns the neighbor in the corresponding direction of an unsigned integer (Direction list: North NorthEast East SouthEast South SouthWest West NorthWest) |
-| geohashNeighbors      | geohashNeighbors(hash string)([]string)                  | Return all neighbors of a string                             |
-| geohashNeighborsInt   | geohashNeighborsInt(hash uint64)([]uint64)               | Return all neighbors of an unsigned integer                  |
+| geohashNeighbors      | geohashNeighbors(hash string)([]string)                  | Return all neighbors of a string                                                                                                                           |
+| geohashNeighborsInt   | geohashNeighborsInt(hash uint64)([]uint64)               | Return all neighbors of an unsigned integer                                                                                                                |
 
  geohashEncode example
 

+ 16 - 16
docs/en_US/sqls/data_types.md

@@ -8,15 +8,15 @@ In eKuiper, each column or an expression has a related data type. A data type de
 
 Below is the list of data types supported.
 
-| #    | Data type | Description                                                  |
-| ---- | --------- | ------------------------------------------------------------ |
-| 1    | bigint    | The int type.                                                |
-| 2    | float     | The float type.                                              |
-| 3    | string    | Text values, comprised of Unicode characters.                |
-| 4    | datetime  | datatime type.          |
-| 5    | boolean   | The boolean type, the value could be `true` or `false`.  |
-| 6    | array     | The array type, can be any types from simple data or struct type |
-| 7    | struct    | The complex type. Set of name/value pairs. Values must be of supported data type. |
+| #   | Data type | Description                                                                       |
+|-----|-----------|-----------------------------------------------------------------------------------|
+| 1   | bigint    | The int type.                                                                     |
+| 2   | float     | The float type.                                                                   |
+| 3   | string    | Text values, comprised of Unicode characters.                                     |
+| 4   | datetime  | datatime type.                                                                    |
+| 5   | boolean   | The boolean type, the value could be `true` or `false`.                           |
+| 6   | array     | The array type, can be any types from simple data or struct type                  |
+| 7   | struct    | The complex type. Set of name/value pairs. Values must be of supported data type. |
 
 ## Compatibility of comparison and calculation
 
@@ -24,13 +24,13 @@ There may be binary operations in each sql clause. In this example, `Select temp
 
 Array and struct are not supported in any binary operations. The compatibility of other data types are listed in below table. Whereas, the row header is the left operand data type and the column header is the right operand data. The value is the compatibility in which Y stands for yes and N stands for no.
 
-| #       | bigint| float  | string                    | datetime| boolean |
-| -------- | ----- | ------ | ------------------------- | ------- | -------|
-| bigint   | Y     | Y      | N                         | N       |  N     |
-| float    | Y     | Y      | N                         | N       |  N     |
-| string   | N     | N      | Y                         | N       |  N     |
-| datetime | Y     | Y      | Y, if in the valid format | Y       |  N     |
-| boolean  | N     | N      | N                         | N       |  Y     |
+| #        | bigint | float | string                    | datetime | boolean |
+|----------|--------|-------|---------------------------|----------|---------|
+| bigint   | Y      | Y     | N                         | N        | N       |
+| float    | Y      | Y     | N                         | N        | N       |
+| string   | N      | N     | Y                         | N        | N       |
+| datetime | Y      | Y     | Y, if in the valid format | Y        | N       |
+| boolean  | N      | N     | N                         | N        | Y       |
 
  The default format for datetime string is `"2006-01-02T15:04:05.000Z07:00"`
 

+ 9 - 9
docs/zh_CN/README.md

@@ -61,12 +61,12 @@ eKuiper 可以运行在各类物联网的边缘使用场景中,比如工业物
 
 - 使用 JMeter MQTT 插件来发送数据到 EMQX 服务器,消息类似于 `{"temperature": 10, "humidity" : 90}`, 温度与湿度的值是介于 0 ~ 100 之间的随机整数值
 - eKuiper 从 EMQX 服务器订阅消息,并且通过 SQL 分析数据: `SELECT * FROM demo WHERE temperature > 50 ` 
-- 分析结果通过 [文件插件](extension/native/sinks/file.md) 写到本地的文件系统里
+- 分析结果通过 [文件插件](rules/sinks/plugin/file.md) 写到本地的文件系统里
 
-| 设备                                                 | 每秒发送消息数 | CPU 使用        | 内存 |
-| ---------------------------------------------------- | -------------- | --------------- | ---- |
-| 树莓派 3B+                                           | 12k            | sys + user: 70% | 20M  |
-| AWS t2.micro (x86: 1 Core * 1 GB) <br />Ubuntu 18.04 | 10k            | sys + user: 25% | 20M  |
+| 设备                                                   | 每秒发送消息数 | CPU 使用          | 内存  |
+|------------------------------------------------------|---------|-----------------|-----|
+| 树莓派 3B+                                              | 12k     | sys + user: 70% | 20M |
+| AWS t2.micro (x86: 1 Core * 1 GB) <br />Ubuntu 18.04 | 10k     | sys + user: 25% | 20M |
 
 ### EdgeX 吞吐量测试
 
@@ -85,11 +85,11 @@ eKuiper 可以运行在各类物联网的边缘使用场景中,比如工业物
 
 - eKuiper 从 EdgeX ZeroMQ 消息总线订阅数据,并且使用 `SELECT * FROM demo WHERE temperature > 50 ` 来分析数据,其中 90% 数据被规则所过滤。
 
-- 分析结果将被发送到 [nop sink](./rules/sinks/nop.md),所有的数据都被忽略。
+- 分析结果将被发送到 [nop sink](./rules/sinks/builtin/nop.md),所有的数据都被忽略。
 
-|                                                | 每秒发送消息数 | CPU 使用      | 内存 |
-| ---------------------------------------------- | -------------- | ------------- | ---- |
-| AWS t2.micro( 1 Core * 1 GB) <br />Ubuntu18.04 | 11.4 k         | sys+user: 75% | 32M  |
+|                                                | 每秒发送消息数 | CPU 使用        | 内存  |
+|------------------------------------------------|---------|---------------|-----|
+| AWS t2.micro( 1 Core * 1 GB) <br />Ubuntu18.04 | 11.4 k  | sys+user: 75% | 32M |
 
 ### 最大规则数支持
 

+ 5 - 5
docs/zh_CN/extension/native/develop/function.md

@@ -8,7 +8,7 @@
 
 为 eKuiper 开发函数的过程,就是实现 [api.Function](https://github.com/lf-edge/ekuiper/blob/master/pkg/api/stream.go) 接口并将其导出为 golang 插件。
 
-在开始开发之前,您必须为 [golang 插件设置环境](../../overview.md#setup-the-plugin-developing-environment)。
+在开始开发之前,您必须为 [golang 插件设置环境](../overview.md#插件开发环境设置)。
 
 为了开发函数,首先要实现 _Validate_ 方法。 在 SQL 验证期间将调用此方法。 在此方法中,将传递 [xsql.Expr](https://github.com/lf-edge/ekuiper/blob/master/pkg/ast/expr.go) 的切片作为参数,该参数包含运行时该函数的参数。 开发人员可以对其进行验证,以检查参数计数和类型等。如果验证成功,则返回 nil。 否则,返回一个错误对象。
 
@@ -30,7 +30,7 @@ IsAggregate() bool
 Exec(args []interface{}) (interface{}, bool)
 ```
 
-由于该函数本身是一个插件,因此必须位于 main 程序包中。 给定的函数结构名称为 myFunction。 在文件的最后,必须将源文件作为符号导出,如下所示。 有[2种类型的导出符号被支持](../../overview.md#plugin-development)。 对于函数扩展,如果没有内部状态,建议导出单例实例。
+由于该函数本身是一个插件,因此必须位于 main 程序包中。 给定的函数结构名称为 myFunction。 在文件的最后,必须将源文件作为符号导出,如下所示。 有[2种类型的导出符号被支持](../overview.md#插件开发)。 对于函数扩展,如果没有内部状态,建议导出单例实例。
 
 ```go
 var MyFunction myFunction
@@ -40,7 +40,7 @@ var MyFunction myFunction
 
 ### 导出多个函数
 
-开发者可在一个函数插件中导出多个函数。每个函数均需实现 [api.Function](https://github.com/lf-edge/ekuiper/blob/master/pkg/api/stream.go) 接口,正如 [开发一个定制函数](#develop-a-customized-function) 所描述的那样。需要确保所有函数都导出了,如下所示:
+开发者可在一个函数插件中导出多个函数。每个函数均需实现 [api.Function](https://github.com/lf-edge/ekuiper/blob/master/pkg/api/stream.go) 接口,正如 [开发一个定制函数](#开发一个定制函数) 所描述的那样。需要确保所有函数都导出了,如下所示:
 
 ```go
 var(
@@ -63,8 +63,8 @@ go build -trimpath -modfile extensions.mod --buildmode=plugin -o plugins/functio
 
 eKuiper 启动时会自动载入插件目录里已编译好的插件。自动载入的函数插件假设插件里仅导出一个同名的函数。如果插件导出多个函数,则需要显示运行一次注册操作。有两种方法可以注册函数:
 
-1. 在开发环境中,建议直接构建插件 .so 文件到插件目录中以便 eKuiper 自动载入。构建完成后,运行 [CLI 注册函数命令](../../../operation/cli/plugins.md#register-functions) or [REST 注册函数 API](../../../operation/restapi/plugins.md#register-functions) 进行注册。
-2. 在生产环境中,[打包插件到 zip 压缩包](plugins_tutorial.md#plugin-deployment-1),然后运行 [CLI 创建函数插件命令](../../../operation/cli/plugins.md#create-a-plugin) 或者 [REST 创建函数 API](../../../operation/restapi/plugins.md#create-a-plugin) 并设置 functions 参数以指定导出函数名。
+1. 在开发环境中,建议直接构建插件 .so 文件到插件目录中以便 eKuiper 自动载入。构建完成后,运行 [CLI 注册函数命令](../../../operation/cli/plugins.md#注册函数) or [REST 注册函数 API](../../../operation/restapi/plugins.md#注册函数) 进行注册。
+2. 在生产环境中,[打包插件到 zip 压缩包](plugins_tutorial.md#部署),然后运行 [CLI 创建函数插件命令](../../../operation/cli/plugins.md#创建插件) 或者 [REST 创建函数 API](../../../operation/restapi/plugins.md#创建插件) 并设置 functions 参数以指定导出函数名。
 
 ### 使用
 

File diff ditekan karena terlalu besar
+ 3 - 3
docs/zh_CN/extension/native/develop/plugins_tutorial.md


+ 0 - 1
docs/zh_CN/extension/native/overview.md

@@ -63,7 +63,6 @@ The development of plugins is to implement a specific interface according to the
 
 2. Export an instance: Kuiper will use the instance as singleton for all plugin load. So all rules will share the same instance. For such implementation, the developer will need to handle the shared states to avoid any potential multi-thread problems. This mode is recommended where there are no shared states and the performance is critical. Especially, function extension is usually functional without internal state which is suitable for this mode.
 
-
 ## 状态存储
 
 eKuiper 扩展通过 context 参数暴露了一个基于键值对的状态存储接口,可用于所有类型的扩展,包括 Source,Sink 和 Function 扩展.

+ 1 - 1
docs/zh_CN/extension/portable/go_sdk.md

@@ -88,4 +88,4 @@ func main() {
 完整例子请参考这个[例子](https://github.com/lf-edge/ekuiper/tree/master/sdk/go/example/mirror)
 
 ## 打包发布
-我们需要将可执行文件和 json 描述文件一起打包,使用 GO SDK,仅仅需要 `go build`编译出可执行文件即可。由于在不同操作系统下编译出到的可执行文件名字有所不同,需要确保 json 描述文件中可执行文件名字的准确性。详细信息,请[参考](./overview.md#package)
+我们需要将可执行文件和 json 描述文件一起打包,使用 GO SDK,仅仅需要 `go build`编译出可执行文件即可。由于在不同操作系统下编译出到的可执行文件名字有所不同,需要确保 json 描述文件中可执行文件名字的准确性。详细信息,请[参考](./overview.md#打包发布)

+ 1 - 1
docs/zh_CN/extension/portable/overview.md

@@ -77,5 +77,5 @@
 
 目前,与原生插件相比,有两个方面的区别:
 
-1. 支持的 Context 方法较少,例如 [State](../native/overview.md#state-storage) , Connection API 暂不支持;动态参数解析需要开发者自行计算。而 state 计划在未来得到支持。
+1. 支持的 Context 方法较少,例如 [State](../native/overview.md#状态存储) , Connection API 暂不支持;动态参数解析需要开发者自行计算。而 state 计划在未来得到支持。
 2. 在函数接口中,参数不能通过AST传递,即用户无法验证参数类型。唯一支持的验证可能是参数计数。在 Sink 接口中,collect 函数的数据类型为 json 编码的 `[]byte`,需要开发者自行解码。

+ 1 - 1
docs/zh_CN/extension/portable/python_sdk.md

@@ -92,7 +92,7 @@ if __name__ == '__main__':
 
 ## 打包发布
 
-由于 python 是解释性语言,不需要编译出可执行文件,需要确保 json 描述文件中可执行文件名字的准确性即可。详细信息,请[参考](./overview.md#package)
+由于 python 是解释性语言,不需要编译出可执行文件,需要确保 json 描述文件中可执行文件名字的准确性即可。详细信息,请[参考](./overview.md#打包发布)
 
 ## 部署要求
 

+ 11 - 11
docs/zh_CN/features.md

@@ -4,17 +4,17 @@
 
 ## 功能列表
 
-| 功能                                                               | Build Tag  | 描述                                                           |
-|------------------------------------------------------------------|------------|--------------------------------------------------------------|
-| 核心                                                               | core       | eKuiper 的核心运行时。 包括流/表/规则的处理器和 REST API ,配置管理,SQL 解析器,规则运行时等。 |
-| [CLI](./cli/overview.md)                                         | rpc        | CLI 服务端                                                      |
-| [EdgeX Foundry 整合](./edgex/edgex_rule_engine_tutorial.md)        | edgex      | 内置的 edgeX source, sink 和共享连接支持                               |
-| [原生插件](./extension/native/overview.md)                           | plugin     | 原生插件运行时,REST API和CLI API等                                    |
-| [Portable 插件](./extension/portable/overview.md)                  | plugin     | Portable 插件运行时,REST API和CLI API等                             |
-| [外部服务](./extension/external/external_func.md)                    | service    | 外部服务运行时,REST API和CLI API等                                    |
-| [UI 元数据API](./manager-ui/overview.md)                            | ui         | 元数据的 REST API,通常由 UI 端消费                                     |
-| [Prometheus 指标](./operation/configuration_file.md#prometheus-配置) | prometheus | 支持发送指标到 prometheus 中                                         |
-| [扩展模板函数](./rules/overview.md#模版中支持的函数)                           | template   | 支持除 go 语言默认的模板函数之外的扩展函数,主要来自 sprig                           |
+| 功能                                                                      | Build Tag  | 描述                                                           |
+|-------------------------------------------------------------------------|------------|--------------------------------------------------------------|
+| 核心                                                                      | core       | eKuiper 的核心运行时。 包括流/表/规则的处理器和 REST API ,配置管理,SQL 解析器,规则运行时等。 |
+| [CLI](./operation/cli/overview.md)                                      | rpc        | CLI 服务端                                                      |
+| [EdgeX Foundry 整合](./edgex/edgex_rule_engine_tutorial.md)               | edgex      | 内置的 edgeX source, sink 和共享连接支持                               |
+| [原生插件](./extension/native/overview.md)                                  | plugin     | 原生插件运行时,REST API和CLI API等                                    |
+| [Portable 插件](./extension/portable/overview.md)                         | plugin     | Portable 插件运行时,REST API和CLI API等                             |
+| [外部服务](./extension/external/external_func.md)                           | service    | 外部服务运行时,REST API和CLI API等                                    |
+| [UI 元数据API](./operation/manager-ui/overview.md)                         | ui         | 元数据的 REST API,通常由 UI 端消费                                     |
+| [Prometheus 指标](./operation/config/configuration_file.md#prometheus-配置) | prometheus | 支持发送指标到 prometheus 中                                         |
+| [扩展模板函数](./rules/overview.md#模版中支持的函数)                                  | template   | 支持除 go 语言默认的模板函数之外的扩展函数,主要来自 sprig                           |
 
 ## Usage
 

+ 9 - 9
docs/zh_CN/operation/config/authentication.md

@@ -21,15 +21,15 @@ Authorization:XXXXXXXXXXXXXXX
 ### JWT Payload
 JWT Payload 应使用以下格式
 
-|  字段   | 是否可选 |  意义  |
-|  ----  | ----  | ----  |
-| iss  | 否| 颁发者 ,  此字段必须与`etc/mgmt`目录中的相应公钥文件名字一致|
-| aud  | 否 |颁发对象 , 此字段必须是 `eKuiper` |
-| exp  | 是 |过期时间 |
-| jti  | 是 |JWT ID |
-| iat  | 是 |颁发时间 |
-| nbf  | 是 |Not Before |
-| sub  | 是 |主题 |
+| 字段  | 是否可选 | 意义                                    |
+|-----|------|---------------------------------------|
+| iss | 否    | 颁发者 ,  此字段必须与`etc/mgmt`目录中的相应公钥文件名字一致 |
+| aud | 否    | 颁发对象 , 此字段必须是 `eKuiper`               |
+| exp | 是    | 过期时间                                  |
+| jti | 是    | JWT ID                                |
+| iat | 是    | 颁发时间                                  |
+| nbf | 是    | Not Before                            |
+| sub | 是    | 主题                                    |
 
 这里有一个 json 格式的例子
 ```json

File diff ditekan karena terlalu besar
+ 4 - 4
docs/zh_CN/operation/manager-ui/plugins_in_manager.md


+ 1 - 1
docs/zh_CN/rules/state_and_fault_tolerance.md

@@ -4,7 +4,7 @@
 eKuiper 支持有状态的规则流。eKuiper 中有两种状态:
 
 1. 窗口操作和可回溯源的内部状态。
-2. 对流上下文扩展公开的用户状态,可参考 [状态存储](../extension/overview.md#state-storage)。
+2. 对流上下文扩展公开的用户状态,可参考 [状态存储](../extension/native/overview.md#状态存储)。
 
 ## 容错
 

+ 18 - 18
docs/zh_CN/sqls/custom_functions.md

@@ -18,8 +18,8 @@ echo(avg) 示例
 
 ## countPlusOne 插件
 
-| 函数         | 示例              | 说明                 |
-| ------------ | ----------------- | -------------------- |
+| 函数           | 示例                | 说明         |
+|--------------|-------------------|------------|
 | countPlusOne | countPlusOne(avg) | 输出参数长度加一的值 |
 
 countPlusOne(avg) 示例
@@ -32,8 +32,8 @@ countPlusOne(avg) 示例
 
 ## accumulateWordCount 插件
 
-| 函数                | 示例                         | 说明                     |
-| ------------------- | ---------------------------- | ------------------------ |
+| 函数                  | 示例                           | 说明           |
+|---------------------|------------------------------|--------------|
 | accumulateWordCount | accumulateWordCount(avg,sep) | 函数统计一共有多少个单词 |
 
 accumulateWordCount(avg,sep) 示例
@@ -48,10 +48,10 @@ accumulateWordCount(avg,sep) 示例
 
 图像处理目前暂时只支持`png`和`jpeg`格式
 
-| 函数      | 示例                               | 说明                                                         |
-| --------- | ---------------------------------- | ------------------------------------------------------------ |
+| 函数        | 示例                                 | 说明                                                      |
+|-----------|------------------------------------|---------------------------------------------------------|
 | resize    | resize(avg,width, height)          | 创建具有新尺寸(宽度,高度)的缩放图像。如果 width 或 height 设置为0,则将其设置为长宽比保留值 |
-| thumbnail | thumbnail(avg,maxWidth, maxHeight) | 将保留宽高比的图像缩小到最大尺寸( maxWidth,maxHeight)。     |
+| thumbnail | thumbnail(avg,maxWidth, maxHeight) | 将保留宽高比的图像缩小到最大尺寸( maxWidth,maxHeight)。                  |
 
 resize(avg,width, height)示例
 
@@ -71,18 +71,18 @@ thumbnail(avg,maxWidth, maxHeight)示例
 
 ### Geohash 插件
 
-| 函数                  | 示例                                                     | 说明                                                         |
-| --------------------- | -------------------------------------------------------- | ------------------------------------------------------------ |
-| geohashEncode         | geohashEncode(la,lo float64)(string)                     | 将经纬度编码为字符串                                         |
-| geohashEncodeInt      | geohashEncodeInt(la,lo float64)(uint64)                  | 将经纬度编码为无类型整数                                     |
-| geohashDecode         | geohashDecode(hash string)(la,lo float64)                | 将字符串解码为经纬度                                         |
-| geohashDecodeInt      | geohashDecodeInt(hash uint64)(la,lo float64)             | 将无类型整数解码为经纬度                                     |
-| geohashBoundingBox    | geohashBoundingBox(hash string)(string)                  | 返回字符串编码的区域                                         |
-| geohashBoundingBoxInt | geohashBoundingBoxInt(hash uint64)(string)               | 返回无类型整数编码的区域                                     |
-| geohashNeighbor       | geohashNeighbor(hash string,direction string)(string)    | 返回一个字符串对应方向上的邻居(方向列表:North NorthEast East SouthEast South SouthWest West NorthWest) |
+| 函数                    | 示例                                                       | 说明                                                                                    |
+|-----------------------|----------------------------------------------------------|---------------------------------------------------------------------------------------|
+| geohashEncode         | geohashEncode(la,lo float64)(string)                     | 将经纬度编码为字符串                                                                            |
+| geohashEncodeInt      | geohashEncodeInt(la,lo float64)(uint64)                  | 将经纬度编码为无类型整数                                                                          |
+| geohashDecode         | geohashDecode(hash string)(la,lo float64)                | 将字符串解码为经纬度                                                                            |
+| geohashDecodeInt      | geohashDecodeInt(hash uint64)(la,lo float64)             | 将无类型整数解码为经纬度                                                                          |
+| geohashBoundingBox    | geohashBoundingBox(hash string)(string)                  | 返回字符串编码的区域                                                                            |
+| geohashBoundingBoxInt | geohashBoundingBoxInt(hash uint64)(string)               | 返回无类型整数编码的区域                                                                          |
+| geohashNeighbor       | geohashNeighbor(hash string,direction string)(string)    | 返回一个字符串对应方向上的邻居(方向列表:North NorthEast East SouthEast South SouthWest West NorthWest)   |
 | geohashNeighborInt    | geohashNeighborInt(hash uint64,direction string)(uint64) | 返回一个无类型整数对应方向上的邻居(方向列表:North NorthEast East SouthEast South SouthWest West NorthWest) |
-| geohashNeighbors      | geohashNeighbors(hash string)([]string)                  | 返回一个字符串的所有邻居                                     |
-| geohashNeighborsInt   | geohashNeighborsInt(hash uint64)([]uint64)               | 返回一个无类型整数的所有邻居                                 |
+| geohashNeighbors      | geohashNeighbors(hash string)([]string)                  | 返回一个字符串的所有邻居                                                                          |
+| geohashNeighborsInt   | geohashNeighborsInt(hash uint64)([]uint64)               | 返回一个无类型整数的所有邻居                                                                        |
 
  geohashEncode 示例
 

+ 16 - 16
docs/zh_CN/sqls/data_types.md

@@ -8,15 +8,15 @@
 
 以下是支持的数据类型的列表。
 
-| #    | 数据类型 | 描述                                                         |
-| ---- | -------- | ------------------------------------------------------------ |
-| 1    | bigint   | 整数型                                                       |
-| 2    | float    | 浮点型                                                       |
-| 3    | string   | 文本值,由 Unicode 字符组成。                                |
-| 4    | datetime | 日期时间类型。                                |
-| 5    | boolean  | 布尔类型,值可以是`true` 或者 `false`。                      |
-| 6    | array    | 数组类型可以是简单数据或结构类型中的任何类型。 |
-| 7    | struct   | 复杂类型。 名称/值对的集合。 值必须是受支持的数据类型。      |
+| #   | 数据类型     | 描述                            |
+|-----|----------|-------------------------------|
+| 1   | bigint   | 整数型                           |
+| 2   | float    | 浮点型                           |
+| 3   | string   | 文本值,由 Unicode 字符组成。           |
+| 4   | datetime | 日期时间类型。                       |
+| 5   | boolean  | 布尔类型,值可以是`true` 或者 `false`。   |
+| 6   | array    | 数组类型可以是简单数据或结构类型中的任何类型。       |
+| 7   | struct   | 复杂类型。 名称/值对的集合。 值必须是受支持的数据类型。 |
 
 ## 比较和计算的兼容性
 
@@ -24,13 +24,13 @@
 
 数组和结构在任何二元操作中均不受支持。 下表列出了其他数据类型的兼容性。 而行标题是左操作数数据类型,列标题是右操作数数据。 关于兼容性的值,其中 Y 表示是,N 表示否。
 
-| #       | bigint| float  | string                    | datetime| boolean |
-| -------- | ----- | ------ | ------------------------- | ------- | -------|
-| bigint   | Y     | Y      | N                         | N       |  N     |
-| float    | Y     | Y      | N                         | N       |  N     |
-| string   | N     | N      | Y                         | N       |  N     |
-| datetime | Y     | Y      | Y, 如满足日期时间默认格式      | Y       |  N     |
-| boolean  | N     | N      | N                         | N       |  Y     |
+| #        | bigint | float | string         | datetime | boolean |
+|----------|--------|-------|----------------|----------|---------|
+| bigint   | Y      | Y     | N              | N        | N       |
+| float    | Y      | Y     | N              | N        | N       |
+| string   | N      | N     | Y              | N        | N       |
+| datetime | Y      | Y     | Y, 如满足日期时间默认格式 | Y        | N       |
+| boolean  | N      | N     | N              | N        | Y       |
 
 日期时间字符串的默认格式是 `"2006-01-02T15:04:05.000Z07:00"`
 

+ 1 - 1
docs/zh_CN/sqls/json_expr.md

@@ -176,7 +176,7 @@ json_path_query(col, jsonpath)
 json_path_query_first(col, jsonpath)
 ```
 
-请参考 [json 函数](./built-in_functions.md#json-functions) 获得详细信息.
+请参考 [json 函数](./built-in_functions.md#JSON-函数) 获得详细信息.
 
 所有这些函数共享相同的参数签名,其中,第二个参数是 jsonpath 字符串。 eKuiper 使用的 jsonpath 语法基于[JsonPath](https://goessner.net/articles/JsonPath/)
 

+ 2 - 2
docs/zh_CN/sqls/tables.md

@@ -14,8 +14,8 @@ CREATE TABLE
     WITH ( property_name = expression [, ...] );
 ```
 
-表支持与流相同的 [数据类型](./streams.md#data-types)。
-表还支持所有[流的属性](./streams.md#language-definitions)。因此,表中也支持所有源类型。许多源不是批处理的,它们在任何给定时间点都有一个事件,这意味着表将始终只有一个事件。一个附加属性 `RETAIN_SIZE` 来指定表快照的大小,以便表可以保存任意数量的历史数据。
+表支持与流相同的 [数据类型](./streams.md#数据类型)。
+表还支持所有[流的属性](./streams.md#语言定义)。因此,表中也支持所有源类型。许多源不是批处理的,它们在任何给定时间点都有一个事件,这意味着表将始终只有一个事件。一个附加属性 `RETAIN_SIZE` 来指定表快照的大小,以便表可以保存任意数量的历史数据。
 
 ## 使用场景