本仓库是Apache IoTDB的Go语言客户端.
Apache IoTDB website: https://iotdb.apache.org Apache IoTDB Github: https://github.com/apache/iotdb
golang >= 1.13
使用go mod
export GO111MODULE=on export GOPROXY=https://goproxy.io mkdir session_example && cd session_example curl -o session_example.go -L https://github.com/apache/iotdb-client-go/raw/main/example/session_example.go go mod init session_example go run session_example.go
不使用go mod,采用GOPATH
# get thrift 0.14.1 go get github.com/apache/thrift cd $GOPATH/src/github.com/apache/thrift git checkout 0.14.1 mkdir -p $GOPATH/src/iotdb-client-go-example/session_example cd $GOPATH/src/iotdb-client-go-example/session_example curl -o session_example.go -L https://github.com/apache/iotdb-client-go/raw/main/example/session_example.go go run session_example.go
函数client/session.go/Open()
有一个参数connectionTimeoutInMs
,表示了以毫秒为单位的连接超时时间。 但旧版本中,该函数在实现时并未正确进行单位转换,而是将其看作了纳秒。现在该问题已修复。 当该参数为0时,表示不设置超时时间;当设置为正数时表示以毫秒为单位的超时时间。