Commit cd30e705 authored by xiaoguang.xu's avatar xiaoguang.xu

更换成http协议

parent 53ce29db
No preview for this file type
...@@ -7,11 +7,11 @@ import ( ...@@ -7,11 +7,11 @@ import (
func NewClient() client.Client { func NewClient() client.Client {
conf := client.UDPConfig{ conf := client.HTTPConfig{
Addr: "172.20.6.33:8089", Addr: "http://172.20.6.33:8086",
} }
con, err := client.NewUDPClient(conf) con, err := client.NewHTTPClient(conf)
if err != nil { if err != nil {
log.Fatal(err) log.Fatal(err)
......
...@@ -93,6 +93,7 @@ func batchWrite(pointArray []*client.Point) { ...@@ -93,6 +93,7 @@ func batchWrite(pointArray []*client.Point) {
points.AddPoints(pointArray) points.AddPoints(pointArray)
err = c.Write(points) err = c.Write(points)
fmt.Println("写入数据",len(pointArray))
if err != nil { if err != nil {
log.Fatal(err) log.Fatal(err)
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment