diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2018-04-17 13:55:43 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2018-04-17 13:55:43 -0400 |
commit | 9b29b1dc30ca57e627195b2238a4fd5b68455b55 (patch) | |
tree | 43bea29066bc9e526610451803d1b6062ff5558d /influxdb.go |
initial commit
Diffstat (limited to 'influxdb.go')
-rw-r--r-- | influxdb.go | 17 |
1 files changed, 17 insertions, 0 deletions
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 +} |