Refactor InfluxDB listener (#6974)

Use streaming parser in InfluxDB listener
This commit is contained in:
reimda
2020-03-04 11:13:44 -07:00
committed by GitHub
parent ab8438dcc6
commit a0276385b1
21 changed files with 19898 additions and 18303 deletions

View File

@@ -13,6 +13,8 @@ import (
"github.com/influxdata/telegraf/metric"
)
type TimeFunc func() time.Time
type Parser struct {
MetricName string
HeaderRowCount int
@@ -31,7 +33,7 @@ type Parser struct {
TimeFunc func() time.Time
}
func (p *Parser) SetTimeFunc(fn metric.TimeFunc) {
func (p *Parser) SetTimeFunc(fn TimeFunc) {
p.TimeFunc = fn
}