influx

package
v0.0.0-...-c6d3e3d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 24, 2017 License: MIT Imports: 5 Imported by: 0

Documentation

Index

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) ParseWithDefaultTime

func (p *InfluxParser) ParseWithDefaultTime(buf []byte, t time.Time) ([]telegraf.Metric, error)

func (*InfluxParser) SetDefaultTags

func (p *InfluxParser) SetDefaultTags(tags map[string]string)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL