summaryrefslogtreecommitdiff
path: root/influxdb.go
blob: 992bef31f3f8726965563180ff1242aec5ab01cf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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
}