Explorar o código

<refactor>(plugin): refactor docs

RockyJin %!s(int64=4) %!d(string=hai) anos
pai
achega
c053da2b73

+ 5 - 0
docs/en_US/plugins/sinks/influxdb.md

@@ -4,6 +4,11 @@ The sink will publish the result into a InfluxDB.
 
 ## Compile & deploy plugin
 
+Please make following update before compile the plugin,
+
+- Add Influxdb library reference in `go.mod`.
+- Remove the first line `// +build influxdb` of file `plugins/sinks/influxdb.go`.
+
 ```shell
 # cd $kuiper_src
 # go build --buildmode=plugin -o plugins/sinks/InfluxDB.so plugins/sinks/influxdb.go

+ 5 - 0
docs/zh_CN/plugins/sinks/influxdb.md

@@ -3,6 +3,11 @@
 该插件将分析结果发送到InfluxDB中
 ## 编译插件&创建插件
 
+在编译之前,请对源代码做如下更改:
+
+- 在 `go.mod` 文件中增加对 InfluxDB 库文件的引用
+-  把文件 `plugins/sinks/influxdb.go` 中的第一行 `// +build influxdb` 删除
+
 ```shell
 # cd $kuiper_src
 # go build --buildmode=plugin -o plugins/sinks/InfluxDB.so plugins/sinks/influxdb.go

+ 2 - 0
plugins/sinks/influxdb.go

@@ -1,3 +1,5 @@
+// +build influxdb
+
 package main
 
 import (