Browse Source

Merge pull request #443 from jinfahua/feat/sink_meta

feat: update the sink metada format
EMQmyd 4 years atrás
parent
commit
a6e018bf44
5 changed files with 79 additions and 80 deletions
  1. 12 12
      plugins/sinks/file.json
  2. 13 13
      plugins/sinks/influxdb.json
  3. 13 13
      plugins/sinks/properties.json
  4. 28 28
      plugins/sinks/taos.json
  5. 13 14
      plugins/sinks/zmq.json

+ 12 - 12
plugins/sinks/file.json

@@ -1,23 +1,23 @@
 {
-	"author": {
-		"name": "Jiyong Huang",
-		"email": "huangjy@emqx.io",
-		"company": "EMQ Technologies Co., Ltd",
-		"website": "https://www.emqx.io"
-	},
-	"libs": [
-	],
 	"about": {
 		"trial": true,
+		"author": {
+			"name": "Jiyong Huang",
+			"email": "huangjy@emqx.io",
+			"company": "EMQ Technologies Co., Ltd",
+			"website": "https://www.emqx.io"
+		},
+		"helpUrl": {
+			"en_US": "https://github.com/emqx/kuiper/blob/master/docs/en_US/plugins/sinks/file.md",
+			"zh_CN": "https://github.com/emqx/kuiper/blob/master/docs/zh_CN/plugins/sinks/file.md"
+		},
 		"description": {
 			"en_US": "This a sink plugin for file, it can be used for saving the analysis data into file system.",
 			"zh_CN": "本插件为文件持久化插件,可以用于将分析数据存入指定的文件中。"
 		}
 	},
-	"helpUrl": {
-		"en_US": "https://github.com/emqx/kuiper/blob/master/docs/en_US/plugins/sinks/file.md",
-		"zh_CN": "https://github.com/emqx/kuiper/blob/master/docs/zh_CN/plugins/sinks/file.md"
-	},
+	"libs": [
+	],
 	"properties": [{
 		"name": "path",
 		"default": "",

+ 13 - 13
plugins/sinks/influxdb.json

@@ -1,24 +1,24 @@
 {
-	"author": {
-		"name": "Yongxing Ma",
-		"email": "",
-		"company": "China Mobile",
-		"website": ""
-	},
-	"libs": [
-	  "github.com/influxdata/influxdb1-client/v2@master"
-	],
 	"about": {
 		"trial": false,
+		"author": {
+			"name": "Yongxing Ma",
+			"email": "",
+			"company": "China Mobile",
+			"website": ""
+		},
+		"helpUrl": {
+			"en_US": "https://github.com/emqx/kuiper/blob/master/docs/en_US/plugins/sinks/influxdb.md",
+			"zh_CN": "https://github.com/emqx/kuiper/blob/master/docs/zh_CN/plugins/sinks/influxdb.md"
+		},
 		"description": {
 			"en_US": "This a sink plugin for InfluxDB, it can be used for saving the analysis data into InfluxDB.",
 			"zh_CN": "本插件为 InfluxDB 的持久化插件,可以用于将分析数据存入 InfluxDB 中。"
 		}
 	},
-	"helpUrl": {
-		"en_US": "https://github.com/emqx/kuiper/blob/master/docs/en_US/plugins/sinks/influxdb.md",
-		"zh_CN": "https://github.com/emqx/kuiper/blob/master/docs/zh_CN/plugins/sinks/influxdb.md"
-	},
+	"libs": [
+	  "github.com/influxdata/influxdb1-client/v2@master"
+	],
 	"properties": [{
 		"name": "addr",
 		"default": "",

+ 13 - 13
plugins/sinks/properties.json

@@ -28,7 +28,7 @@
 			"zh_CN": "设置可缓存消息数目。若缓存消息数超过此限制,sink将阻塞消息接收,直到缓存消息被消费使得缓存消息数目小于限制为止。"
 		},
 		"label": {
-			"en_US": "BufferLength",
+			"en_US": "Buffer length",
 			"zh_CN": "缓存大小"
 		}
 	}, {
@@ -42,7 +42,7 @@
 			"zh_CN": "设置是否异步运行输出操作以提升性能。请注意,异步运行的情况下,输出结果顺序不能保证。"
 		},
 		"label": {
-			"en_US": "RunAsync",
+			"en_US": "Run async",
 			"zh_CN": "是否异步运行"
 		}
 	}, {
@@ -56,7 +56,7 @@
 			"zh_CN": "设置信息发送失败后重试等待时间,单位为毫秒。如果该值的设置 <= 0,那么不会尝试重新发送。"
 		},
 		"label": {
-			"en_US": "RetryInterval",
+			"en_US": "Retry interval",
 			"zh_CN": "失败重试间隔毫秒"
 		}
 	}, {
@@ -70,7 +70,7 @@
 			"zh_CN": "设置最大消息缓存数量。缓存的消息会一直保留直到消息发送成功。缓存消息将按顺序发送,除非运行在异步或者并发模式下。缓存消息会定期存储到磁盘中。"
 		},
 		"label": {
-			"en_US": "CacheLength",
+			"en_US": "Cache length",
 			"zh_CN": "最大消息缓存数量"
 		}
 	}, {
@@ -84,7 +84,7 @@
 			"zh_CN": "设置缓存存储间隔时间,单位为毫秒。需要注意的是,当规则关闭时,缓存会自动存储。该值越大,则缓存保存开销越小,但系统意外退出时缓存丢失的风险变大。"
 		},
 		"label": {
-			"en_US": "CacheSaveInterval",
+			"en_US": "Cache save interval",
 			"zh_CN": "缓存间隔毫秒"
 		}
 	}, {
@@ -98,7 +98,7 @@
 			"zh_CN": "如果选择结果为空,则忽略输出。"
 		},
 		"label": {
-			"en_US": "OmitIfEmpty",
+			"en_US": "Omit if content is empty",
 			"zh_CN": "是否忽略输出"
 		}
 	}, {
@@ -109,25 +109,25 @@
 		"control": "radio",
 		"hint": {
 			"en_US": "The output messages are received as an array. This is indicate whether to send the results one by one. If false, the output message will be {\"result\":\"${the string of received message}\"}. For example, {\"result\":\"[{\"count\":30},\"\"count\":20}]\"}. Otherwise, the result message will be sent one by one with the actual field name. For the same example as above, it will send {\"count\":30}, then send {\"count\":20} to the RESTful endpoint.Default to false.",
-			"zh_CN": "输出消息以数组形式接收,该属性意味着是否将结果一一发送。 如果为false,则输出消息将为{\"result\":\"${the string of received message}\"}。 例如,{\"result\":\"[{\"count\":30},\"\"count\":20}]\"}。否则,结果消息将与实际字段名称一一对应发送。 对于与上述相同的示例,它将发送 {\"count\":30},然后发送{\"count\":20} 到 RESTful 端点。默认为 false。"
+			"zh_CN": "输出消息以数组形式接收,该属性意味着是否将结果一一发送。 如果为 false,则输出消息将为{\"result\":\"${the string of received message}\"}。 例如,{\"result\":\"[{\"count\":30},\"\"count\":20}]\"}。否则,结果消息将与实际字段名称一一对应发送。 对于与上述相同的示例,它将发送 {\"count\":30},然后发送{\"count\":20} 到 RESTful 端点。默认为 false。"
 		},
 		"label": {
-			"en_US": "SendSingle",
-			"zh_CN": "是否指定接收数据格式"
+			"en_US": "Send single",
+			"zh_CN": "将结果数据按条发送"
 		}
 	}, {
 		"name": "dataTemplate",
 		"default":true, 
 		"optional": true,
 		"type": "bool",
-		"control": "radio",
+		"control": "textarea",
 		"hint": {
 			"en_US": "The golang template format string to specify the output data format. The input of the template is the sink message which is always an array of map. If no data template is specified, the raw input will be the data.",
-			"zh_CN": "golang 模板格式字符串,用于指定输出数据格式。 模板的输入是目标消息,该消息始终是映射数组。 如果未指定数据模板,则将数据作为原始输入。"
+			"zh_CN": "Golang 模板格式字符串,用于指定输出数据格式。 模板的输入是目标消息,该消息始终是 map 数组。 如果未指定数据模板,则将数据作为原始输入。"
 		},
 		"label": {
-			"en_US": "DataTemplate",
-			"zh_CN": "是否指定输出数据格式"
+			"en_US": "Data template",
+			"zh_CN": "数据模版"
 		}
 	}]
 }

+ 28 - 28
plugins/sinks/taos.json

@@ -1,24 +1,24 @@
 {
-	"author": {
-		"name": "Yuedong Ma",
-		"email": "mayuedong@emqx.io",
-		"company": "EMQ Technologies Co., Ltd",
-		"website": "https://www.emqx.io"
-	},
-	"libs": [
-		"github.com/taosdata/driver-go@master"
-	],
 	"about": {
 		"trial": false,
+		"author": {
+			"name": "Yuedong Ma",
+			"email": "mayuedong@emqx.io",
+			"company": "EMQ Technologies Co., Ltd",
+			"website": "https://www.emqx.io"
+		},
+		"helpUrl": {
+			"en_US": "https://github.com/emqx/kuiper/blob/master/docs/en/plugins/sinks/taos.md",
+			"zh_CN": "https://github.com/emqx/kuiper/blob/master/docs/zh/plugins/sinks/taos.md"
+		},
 		"description": {
 			"en_US": "This a sink plugin for TDengine, it can be used for saving the analysis data into TDengine.",
 			"zh_CN": "本插件为 TDengine 的持久化插件,可以用于将分析数据存入 TDengine 中"
 		}
 	},
-	"helpUrl": {
-		"en_US": "https://github.com/emqx/kuiper/blob/master/docs/en/plugins/sinks/taos.md",
-		"zh_CN": "https://github.com/emqx/kuiper/blob/master/docs/zh/plugins/sinks/taos.md"
-	},
+	"libs": [
+		"github.com/taosdata/driver-go@master"
+	],
 	"properties": [{
 		"name": "ip",
 		"default": "127.0.0.1",
@@ -30,8 +30,8 @@
 			"zh_CN": "Taosdb IP 地址"
 		},
 		"label": {
-			"en_US": "DB IP address",
-			"zh_CN": "数据库IP 地址"
+			"en_US": "Database address",
+			"zh_CN": "数据库地址"
 		}
 	}, {
 		"name": "port",
@@ -40,12 +40,12 @@
 		"control": "text",
 		"type": "int",
 		"hint": {
-			"en_US": "Port of Taosdb",
-			"zh_CN": "Taosdb 端口号"
+			"en_US": "Database port",
+			"zh_CN": "数据库端口号"
 		},
 		"label": {
-			"en_US": "DB port",
-			"zh_CN": "数据库端口"
+			"en_US": "Port",
+			"zh_CN": "端口"
 		}
 	}, {
 		"name": "user",
@@ -54,12 +54,12 @@
 		"control": "text",
 		"type": "string",
 		"hint": {
-			"en_US": "User of Taosdb",
-			"zh_CN": "Taosdb 用户名"
+			"en_US": "Username",
+			"zh_CN": "用户名"
 		},
 		"label": {
-			"en_US": "DB user",
-			"zh_CN": "数据库用户名"
+			"en_US": "Username",
+			"zh_CN": "用户名"
 		}
 	}, {
 		"name": "password",
@@ -72,8 +72,8 @@
 			"zh_CN": "数据库密码"
 		},
 		"label": {
-			"en_US": "DB password",
-			"zh_CN": "数据库密码"
+			"en_US": "Password",
+			"zh_CN": "密码"
 		}
 	}, {
 		"name": "database",
@@ -82,7 +82,7 @@
 		"control": "text",
 		"type": "string",
 		"hint": {
-			"en_US": "Name of database",
+			"en_US": "Database name",
 			"zh_CN": "库名称"
 		},
 		"label": {
@@ -96,11 +96,11 @@
 		"control": "text",
 		"type": "string",
 		"hint": {
-			"en_US": "Name of table",
+			"en_US": "Table name",
 			"zh_CN": "表名"
 		},
 		"label": {
-			"en_US": "Name of table",
+			"en_US": "Table name",
 			"zh_CN": "表名"
 		}
 	}, {

+ 13 - 14
plugins/sinks/zmq.json

@@ -1,25 +1,24 @@
 {
-	"author": {
-		"name": "Jiyong Huang",
-		"email": "huangjy@emqx.io",
-		"company": "EMQ Technologies Co., Ltd",
-		"website": "https://www.emqx.io"
-	},
-
-	"libs": [
-      "github.com/pebbe/zmq4@master"
-	],
 	"about": {
 		"trial": true,
+		"author": {
+			"name": "Jiyong Huang",
+			"email": "huangjy@emqx.io",
+			"company": "EMQ Technologies Co., Ltd",
+			"website": "https://www.emqx.io"
+		},
+		"helpUrl": {
+			"en_US": "https://github.com/emqx/kuiper/blob/master/docs/en_US/plugins/sinks/zmq.md",
+			"zh_CN": "https://github.com/emqx/kuiper/blob/master/docs/zh_CN/plugins/sinks/zmq.md"
+		},
 		"description": {
 			"en_US": "This a demo 0MQ sink plugin, it cannot be used in production env.",
 			"zh_CN": "本插件为演示 ZMQ 数据发送插件,不能使用在生产环境中"
 		}
 	},
-	"helpUrl": {
-		"en_US": "https://github.com/emqx/kuiper/blob/master/docs/en_US/plugins/sinks/zmq.md",
-		"zh_CN": "https://github.com/emqx/kuiper/blob/master/docs/zh_CN/plugins/sinks/zmq.md"
-	},
+	"libs": [
+      "github.com/pebbe/zmq4@master"
+	],
 	"properties": [{
 		"name": "server",
 		"default": "127.0.0.1:5536",