package data

import (
	"git.quantgroup.cn/DevOps/enoch/service/conf"
	"github.com/influxdata/influxdb/client/v2"
	"log"
)

func NewClient() client.Client {
	var httpConfig = client.HTTPConfig{
		Addr: conf.GlobalConfig.InfluxDb.Host + conf.GlobalConfig.InfluxDb.Port,
	}
	con, err := client.NewHTTPClient(httpConfig)

	if err != nil {
		log.Fatal(err)
	}

	return con

}
