Skip to content

Commit

Permalink
chore: update the json file of sources and sinks (#2462)
Browse files Browse the repository at this point in the history
Signed-off-by: oucb <[email protected]>
Signed-off-by: Jiyong Huang <[email protected]>
Co-authored-by: Jiyong Huang <[email protected]>
  • Loading branch information
oucb and ngjaying authored Dec 11, 2023
1 parent 49706e9 commit 518299d
Show file tree
Hide file tree
Showing 35 changed files with 649 additions and 409 deletions.
1 change: 1 addition & 0 deletions .github/workflows/run_test_case.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ jobs:
go build --buildmode=plugin -o plugins/functions/[email protected] extensions/functions/accumulateWordCount/accumulateWordCount.go
go build --buildmode=plugin -o data/test/helloworld.so internal/converter/protobuf/test/*.go
go build --buildmode=plugin -o data/myFormat.so internal/converter/custom/test/*.go
cp test/lookup.json data/lookup.json
mkdir -p data/custom
cp data/myFormat.so data/custom/myFormat.so
mkdir -p data/schema
Expand Down
42 changes: 7 additions & 35 deletions etc/mqtt_source.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
"zh_CN": "https://ekuiper.org/docs/zh/latest/guide/sources/builtin/mqtt.html"
},
"description": {
"en_US": "eKuiper provides built-in support for MQTT source stream, which can subscribe the message from MQTT broker and feed into the eKuiper processing pipeline.",
"zh_CN": "eKuiper 为 MQTT 源流提供了内置支持,流可以订阅来自 MQTT 代理的消息并输入 eKuiper 处理管道"
"en_US": "subscribe the message from MQTT broker and feed into the processing pipeline.",
"zh_CN": "订阅来自 MQTT 代理的消息并输入处理管道"
}
},
"libs": [],
Expand Down Expand Up @@ -47,7 +47,7 @@
}, {
"name": "server",
"default": "tcp://127.0.0.1:1883",
"optional": true,
"optional": false,
"connection_related": true,
"control": "text",
"type": "string",
Expand Down Expand Up @@ -102,7 +102,7 @@
"type": "string",
"hint": {
"en_US": "MQTT protocol version. 3.1 (also refer as MQTT 3) or 3.1.1 (also refer as MQTT 4). If not specified, the default value is 3.1.",
"zh_CN": "MQTT 协议版本。3.1 (也被称为 MQTT 3) 或者 3.1.1 (也被称为 MQTT 4)。 如果未指定,缺省值为 3.1。 "
"zh_CN": "MQTT 协议版本。3.1 (也被称为 MQTT 3) 或者 3.1.1 (也被称为 MQTT 4)。 "
},
"label": {
"en_US": "MQTT Protocol Version",
Expand Down Expand Up @@ -135,7 +135,7 @@
"zh_CN": "默认订阅 QoS 级别"
},
"label": {
"en_US": "Qos level",
"en_US": "QoS level",
"zh_CN": "QoS 级别"
}
}, {
Expand Down Expand Up @@ -198,34 +198,6 @@
"en_US": "Skip Certification verification",
"zh_CN": "跳过证书验证"
}
}, {
"name": "kubeedgeVersion",
"default": "",
"optional": true,
"control": "text",
"type": "string",
"hint": {
"en_US": "Kubeedge version number. Different version numbers correspond to different file contents.",
"zh_CN": "Kubeedge 版本号,不同的版本号对应的文件内容不同"
},
"label": {
"en_US": "Kubeedge version",
"zh_CN": "Kubeedge 版本号"
}
}, {
"name": "kubeedgeModelFile",
"default": "",
"optional": true,
"control": "text",
"type": "string",
"hint": {
"en_US": "The name of KubeEdge template file. The file is located in the specified etc/sources folder.",
"zh_CN": "KubeEdge 模版文件名,文件指定放在 etc/sources 文件夹中"
},
"label": {
"en_US": "KubeEdge model file",
"zh_CN": "KubeEdge 模型文件"
}
}, {
"name": "decompression",
"default": "",
Expand All @@ -239,8 +211,8 @@
"zstd"
],
"hint": {
"en_US": "Decompress the MQTT payload with the specified compression method.",
"zh_CN": "使用指定的压缩方法解压缩 MQTT Payload。"
"en_US": "Decompress the MQTT payload with the specified compression method. Leave blank to not decompress.",
"zh_CN": "使用指定的压缩方法解压缩 MQTT Payload,留空表示不解压缩"
},
"label": {
"en_US": "Decompression",
Expand Down
8 changes: 5 additions & 3 deletions etc/mqtt_source.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
default:
qos: 1
server: "tcp://127.0.0.1:1883"
protocolVersion: "3.1.1"
insecureSkipVerify: false
#decompression: zlib
#username: user1
#password: password
Expand All @@ -13,6 +15,6 @@ default:
#kubeedgeVersion:
#kubeedgeModelFile: ""

demo_conf: #Conf_key
qos: 0
server: "tcp://10.211.55.6:1883"
# demo_conf: #Conf_key
# qos: 0
# server: "tcp://10.211.55.6:1883"
42 changes: 21 additions & 21 deletions etc/sinks/file.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
"control": "text",
"type": "string",
"hint": {
"en_US": "The file path for saving the result, could be dynamic like {{.field}}.txt",
"zh_CN": "保存结果的文件路径,可为动态路径,例如 {{.field}}.txt"
"en_US": "The file path to save the results. The file supports absolute paths and relative paths. The relative path is the installation directory of the software, or it can be a dynamic path, such as {{.field}}.txt",
"zh_CN": "保存结果的文件路径,文件支持绝对路径和相对路径,相对路径为软件的安装目录,也可为动态路径,例如 {{.field}}.txt"
},
"label": {
"en_US": "Path of file",
Expand Down Expand Up @@ -66,15 +66,29 @@
"en_US": "Has header",
"zh_CN": "是否包含文件头"
}
}, {
},{
"name": "rollingCount",
"default": 10000,
"optional": true,
"control": "text",
"type": "int",
"hint": {
"en_US": "The maximum message counts in a file before rollover.",
"zh_CN": "文件翻转前的最大消息计数。"
},
"label": {
"en_US": "Rolling Count",
"zh_CN": "Rolling 计数"
}
},{
"name": "rollingInterval",
"default": "",
"optional": true,
"control": "text",
"type": "int",
"hint": {
"en_US": "The interval in millisecond for checking time based rolling policies. This controls the frequency to check whether a part file should rollover.",
"zh_CN": "滚动到新文件的最小时间间隔(以毫秒为单位)。检查频率由checkInterval 控制。"
"zh_CN": "滚动到新文件的最小时间间隔(以毫秒为单位)。检查频率由 checkInterval 控制。"
},
"label": {
"en_US": "Rolling Interval",
Expand All @@ -94,23 +108,9 @@
"en_US": "Check Interval",
"zh_CN": "检查间隔"
}
}, {
"name": "rollingCount",
"default": "10000",
"optional": true,
"control": "text",
"type": "int",
"hint": {
"en_US": "The maximum message counts in a file before rollover.",
"zh_CN": "文件翻转前的最大消息计数。"
},
"label": {
"en_US": "Rolling Count",
"zh_CN": "Rolling 计数"
}
}, {
"name": "rollingNamePattern",
"default": "",
"default": "suffix",
"optional": true,
"control": "select",
"type": "string",
Expand All @@ -120,8 +120,8 @@
"none"
],
"hint": {
"en_US": "Define how to named the rolling files by specifying where to put the timestamp during file creation. The value could be \"prefix\", \"suffix\" or \"none\".",
"zh_CN": "指定滚动文件创建时如何放置时间戳。时间戳可为“前缀”,“后缀”或“无”。"
"en_US": "Define how to named the rolling files by specifying where to put the timestamp during file creation. The value could be \"prefix\", \"suffix\" or \"none\".If \"None\", the file will be overwritten.",
"zh_CN": "指定滚动文件创建时如何放置时间戳。时间戳可为“前缀”,“后缀”或“无”。如果为“无”,则文件会被覆盖。"
},
"label": {
"en_US": "Rolling Name Pattern",
Expand Down
4 changes: 2 additions & 2 deletions etc/sinks/log.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
"zh_CN": "https://ekuiper.org/docs/zh/latest/guide/sinks/builtin/log.html"
},
"description": {
"en_US": "The action is used for print output message into log file, the log file is at $ekuiper_install/log/stream.log by default.",
"zh_CN": "该操作用于将输出消息打印到日志文件中,默认情况下,该日志文件位于 $ekuiper_install/log/stream.log 中。"
"en_US": "The action is used for print output message into log file",
"zh_CN": "该操作用于将输出消息打印到日志文件中"
}
},
"properties": [],
Expand Down
4 changes: 2 additions & 2 deletions etc/sinks/memory.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,11 @@
"type": "string",
"hint": {
"en_US": "Specify which field represents the key of the message. It is required when rowkindField is specified.",
"zh_CN": "指定哪个字段表示消息的key。当指定了动作字段时,该字段是必须的。"
"zh_CN": "指定哪个字段表示消息的 key。当指定了动作字段时,该字段是必须的。"
},
"label": {
"en_US": "Key Field",
"zh_CN": "Key字段"
"zh_CN": "Key 字段"
}
}
],
Expand Down
10 changes: 5 additions & 5 deletions etc/sinks/mqtt.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@
"type": "string",
"connection_related": true,
"hint": {
"en_US": "MQTT protocol version. 3.1 (also refer as MQTT 3) or 3.1.1 (also refer as MQTT 4). If not specified, the default value is 3.1.",
"zh_CN": "MQTT 协议版本。3.1 (也被称为 MQTT 3) 或者 3.1.1 (也被称为 MQTT 4)。 如果未指定,缺省值为 3.1。"
"en_US": "MQTT protocol version. 3.1 (also refer as MQTT 3) or 3.1.1 (also refer as MQTT 4). ",
"zh_CN": "MQTT 协议版本。3.1 (也被称为 MQTT 3) 或者 3.1.1 (也被称为 MQTT 4)。"
},
"label": {
"en_US": "MQTT protocol version",
Expand Down Expand Up @@ -224,7 +224,7 @@
"connection_related": true,
"hint": {
"en_US": "If InsecureSkipVerify is true, TLS accepts any certificate presented by the server and any host name in that certificate. In this mode, TLS is susceptible to man-in-the-middle attacks. The default value is false. The configuration item can only be used with TLS connections.",
"zh_CN": "如果 InsecureSkipVerify 设置为 true, TLS接受服务器提供的任何证书以及该证书中的任何主机名。 在这种模式下,TLS容易受到中间人攻击。默认值为false。配置项只能用于TLS连接"
"zh_CN": "如果 InsecureSkipVerify 设置为 true, TLS 接受服务器提供的任何证书以及该证书中的任何主机名。 在这种模式下,TLS 容易受到中间人攻击。默认值为 false。配置项只能用于 TLS 连接"
},
"label": {
"en_US": "Skip Certification verification",
Expand All @@ -243,8 +243,8 @@
"zstd"
],
"hint": {
"en_US": "Compress the payload with the specified compression method.",
"zh_CN": "使用指定的压缩方法压缩 Payload。"
"en_US": "Compress the payload with the specified compression method. Leave blank to indicate no compression.",
"zh_CN": "使用指定的压缩方法压缩 Payload,留空表示不压缩"
},
"label": {
"en_US": "Compression",
Expand Down
28 changes: 14 additions & 14 deletions etc/sinks/neuron.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
"zh_CN": "https://github.com/lf-edge/ekuiper/blob/master/docs/zh_CN/rules/sinks/builtin/"
},
"description": {
"en_US": "The action is used to publish the result into the local neuron instance.",
"zh_CN": "该操作用于发送消息到本地的 neuron 中"
"en_US": "The action is used to publish the result into the data collection engine.",
"zh_CN": "该操作用于发送消息到数采引擎中"
}
},
"properties": [
Expand All @@ -24,8 +24,8 @@
"control": "text",
"type": "string",
"hint": {
"en_US": "The nng url to connect to neuron.",
"zh_CN": "连接 Neuron 的 nng url"
"en_US": "The url to connect to data collection engine.",
"zh_CN": "连接数采引擎的 URL"
},
"label": {
"en_US": "URL",
Expand All @@ -34,13 +34,13 @@
},
{
"name": "nodeName",
"default": "",
"optional": true,
"control": "text",
"default": "",
"type": "string",
"hint": {
"en_US": "The neuron node name",
"zh_CN": "Neuron 节点名称"
"en_US": "The data collection engine node name",
"zh_CN": "数采引擎节点名称"
},
"label": {
"en_US": "Node Name",
Expand All @@ -49,13 +49,13 @@
},
{
"name": "groupName",
"default": "",
"optional": true,
"control": "text",
"default": "",
"type": "string",
"hint": {
"en_US": "The neuron group name",
"zh_CN": "Neuron 分组名称"
"en_US": "The data collection engine node's group name",
"zh_CN": "数采引擎节点分组名称"
},
"label": {
"en_US": "Group Name",
Expand All @@ -69,8 +69,8 @@
"control": "list",
"type": "list_string",
"hint": {
"en_US": "Tags of neuron to be sent",
"zh_CN": "要写入的Neuron标签"
"en_US": "Tags to be sent",
"zh_CN": "要写入的数据标签,规则中的字段名称和数采引擎中的数据标签名称应相同。"
},
"label": {
"en_US": "Tags",
Expand All @@ -84,8 +84,8 @@
"default": false,
"type": "bool",
"hint": {
"en_US": "Whether to send the raw string",
"zh_CN": "是否发送原始字符串"
"en_US": "Whether to send the original string. Select Yes to send the original data to the data collection engine through the data template, while ignoring the configuration of the node name, group name, and tags.",
"zh_CN": "是否发送原始字符串。选择是,则通过数据模板发送原始数据给数采引擎,同时忽略节点名称、分组名称、标签字段的配置。"
},
"label": {
"en_US": "Raw",
Expand Down
16 changes: 8 additions & 8 deletions etc/sinks/redis.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@
"properties": [
{
"name": "addr",
"default": "10.122.48.17:6379",
"default": "127.0.0.1:6379",
"optional": false,
"control": "text",
"type": "string",
"hint": {
"en_US": "The addr of the Redis,example: 10.122.48.17:6379",
"zh_CN": "Redis的地址, 例如: 10.122.48.17:6379"
"zh_CN": "Redis的地址, 例如: 127.0.0.1:6379"
},
"label": {
"en_US": "Address",
Expand Down Expand Up @@ -58,7 +58,7 @@
"type": "int",
"hint": {
"en_US": "The database of the Redis,example: 0",
"zh_CN": "Redis 的数据库,例如0"
"zh_CN": "Redis 的数据库,例如 0"
},
"label": {
"en_US": "DataBase name",
Expand All @@ -73,7 +73,7 @@
"type": "string",
"hint": {
"en_US": "Select one of the Key, Key and field of Redis data and give priority to field",
"zh_CN": "Redis 数据的Key, key与field选择其中一个,优先field"
"zh_CN": "Redis 数据的 Key, key 与 field 选择其中一个,优先 field"
},
"label": {
"en_US": "Key",
Expand All @@ -88,7 +88,7 @@
"type": "string",
"hint": {
"en_US": "This field must exist and be of type string. Otherwise, use the field character as the key. Note: Do not use a data template to configure this value",
"zh_CN": "json数据某一个属性,配置它作为redis数据的key值, 例如 deviceName,该字段必须存在且为string类型,否则以field字符作为key,注意:配置该值不要使用数据模板"
"zh_CN": "JSON 数据某一个属性,配置它作为 redis 数据的 key 值, 例如 deviceName,该字段必须存在且为 string 类型,否则以 field 字符作为 key,注意:配置该值不要使用数据模板"
},
"label": {
"en_US": "Key Field",
Expand All @@ -97,9 +97,9 @@
},
{
"name": "keyType",
"default": "single",
"optional": true,
"control": "select",
"default": "single",
"type": "string",
"values": [
"single",
Expand All @@ -126,7 +126,7 @@
],
"hint": {
"en_US": "The default Redis data type is string. Note that the original key must be deleted after the Redis data type is changed. Otherwise, the modification is invalid。",
"zh_CN": "Redis 数据的类型, 默认是 string, 注意修改类型之后,需在redis中删除原有key,否则修改无效。"
"zh_CN": "Redis 数据的类型, 默认是 string, 注意修改类型之后,需在 redis 中删除原有 key,否则修改无效。"
},
"label": {
"en_US": "Data type",
Expand All @@ -141,7 +141,7 @@
"type": "int",
"hint": {
"en_US": "Timeout duration of Redis data. This parameter is valid only for string data in seconds. The default value is -1 ",
"zh_CN": "Redis数据的超时时间,仅在string类型数据有效,单位是秒,默认是永久保存-1 "
"zh_CN": "Redis 数据的超时时间,仅在 string 类型数据有效,单位是秒默认是永久保存(-1)"
},
"label": {
"en_US": "Expiration",
Expand Down
Loading

0 comments on commit 518299d

Please sign in to comment.