From 9b29b1dc30ca57e627195b2238a4fd5b68455b55 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Tue, 17 Apr 2018 13:55:43 -0400 Subject: initial commit --- influxdb.go | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 influxdb.go (limited to 'influxdb.go') diff --git a/influxdb.go b/influxdb.go new file mode 100644 index 0000000..992bef3 --- /dev/null +++ b/influxdb.go @@ -0,0 +1,17 @@ +package main + +import ( + "time" + + client "github.com/influxdata/influxdb/client/v2" +) + +type Point = *client.Point + +func NewPoint(name string, tags map[string]string, fields map[string]interface{}) Point { + pt, err := client.NewPoint(name, tags, fields, time.Now()) + if err != nil { + panic(err) + } + return pt +} -- cgit v1.2.3