Go 1.17 or later is required.Add the client package your to your project dependencies (go.mod). go get github.com/influxdata/influxdb-client-go/v2 Add import github.com/influxdata/influxdb-client-go/v2 to your source code.Basic Example...
- [#403](https://github.com/influxdata/influxdb-client-go/pull/403) Custom checks de/serialization to allow calling server Check API ## 2.13.0 [2023-12-05] ### Features 358 changes: 358 additions & 0 deletions 358 api/checks_test.go Original file line numberDiff line numberDiff line...
整数类型:InfluxDB 支持的整数类型是int64。如果你的 Go 变量是int类型或其他整数类型(如int8、int16、int32),则需要将其转换为int64类型。 浮点数类型:InfluxDB 支持的浮点数类型是float64。如果你的 Go 变量是float32或其他浮点数类型,则需要将其转换为float64类型。 布尔类型:InfluxDB 支持布尔类型。如果你的...
Install Go 1.13 or later. Add the client package your to your project dependencies. # Add InfluxDB Go client package to your project go.mod go get github.com/influxdata/influxdb-client-go/v2 Ensure that InfluxDB is running and you can connect to it. For information about what URL to ...
package main.go import ( "context" "fmt" "os" "time" "github.com/InfluxCommunity/influxdb3-go/influxdb3" ) func main() { // Use env variables to initialize client url := os.Getenv("INFLUXDB_URL") token := os.Getenv("INFLUXDB_TOKEN") database := os.Getenv("INFLUXDB_DATABASE"...
使用/influxdata/influxdb/client/v2依赖包向 InfluxDB 写入数据的示例代码: package main import ( "fmt" "log" "time" "/influxdata/influxdb/client/v2" ) const ( MyDB = "mydb" username = "" password = "" ) func main() { c, err := client.NewHTTPClient(client.HTTPConfig{ ...
client:=influxdb2.NewClient(url,token) Create awrite clientwith theWriteAPIBlockingmethod and pass in theorgandbucketparameters. writeAPI:=client.WriteAPIBlocking(org,bucket) Write data to InfluxDB with Go Use the Go library to write data to InfluxDB. ...
简介:go使用 github.com/influxdata/influxdb/client/v2 写数据到 influxdb 转载请注明出处: 接入示例 使用github.com/influxdata/influxdb/client/v2依赖包向 InfluxDB 写入数据的示例代码: package mainimport ("fmt""log""time""github.com/influxdata/influxdb/client/v2")const (MyDB = "mydb"username ...
- [#403](https://github.com/influxdata/influxdb-client-go/pull/403) Custom checks de/serialization to allow calling server Check API 11 changes: 5 additions & 6 deletions 11 api/checks_test.go Original file line numberDiff line numberDiff line change @@ -118,8 +118,7 @@ func Test...
InfluxDB 2 Go Client. Contribute to influxdata/influxdb-client-go development by creating an account on GitHub.