Documentation ¶
Index ¶
- type InfluxParser
- func (p *InfluxParser) Parse(buf []byte) ([]telegraf.Metric, error)
- func (p *InfluxParser) ParseLine(line string) (telegraf.Metric, error)
- func (p *InfluxParser) ParseWithDefaultTimePrecision(buf []byte, t time.Time, precision string) ([]telegraf.Metric, error)
- func (p *InfluxParser) SetDefaultTags(tags map[string]string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InfluxParser ¶
type InfluxParser struct { // DefaultTags will be added to every parsed metric DefaultTags map[string]string }
InfluxParser is an object for Parsing incoming metrics.
func (*InfluxParser) Parse ¶
func (p *InfluxParser) Parse(buf []byte) ([]telegraf.Metric, error)
Parse returns a slice of Metrics from a text representation of a metric (in line-protocol format) with each metric separated by newlines. If any metrics fail to parse, a non-nil error will be returned in addition to the metrics that parsed successfully.
func (*InfluxParser) ParseLine ¶
func (p *InfluxParser) ParseLine(line string) (telegraf.Metric, error)
func (*InfluxParser) ParseWithDefaultTimePrecision ¶
func (*InfluxParser) SetDefaultTags ¶
func (p *InfluxParser) SetDefaultTags(tags map[string]string)
Click to show internal directories.
Click to hide internal directories.