Documentation ¶
Index ¶
Constants ¶
View Source
const MAX_BUFFER_SIZE = 2
Variables ¶
View Source
var ( ErrEOF = errors.New("EOF") ErrInvalidTimestamp = errors.New("Invalid timestamp") )
Functions ¶
This section is empty.
Types ¶
type ElementParser ¶
type ElementParser interface {
// contains filtered or unexported methods
}
Interface for parsing line elements.
func NewWavefrontElements ¶
func NewWavefrontElements() []ElementParser
Returns a slice of ElementParser's for the Graphite format
type LiteralParser ¶
type LiteralParser struct {
// contains filtered or unexported fields
}
type LoopedParser ¶
type LoopedParser struct {
// contains filtered or unexported fields
}
type NameParser ¶
type NameParser struct{}
type PointParser ¶
type PointParser struct { Elements []ElementParser // contains filtered or unexported fields }
Parser represents a parser.
func NewWavefrontParser ¶
func NewWavefrontParser(defaultTags map[string]string) *PointParser
func (*PointParser) ParseLine ¶
func (p *PointParser) ParseLine(line string) (telegraf.Metric, error)
func (*PointParser) SetDefaultTags ¶
func (p *PointParser) SetDefaultTags(tags map[string]string)
type PointScanner ¶
type PointScanner struct {
// contains filtered or unexported fields
}
Lexical Point Scanner
func NewScanner ¶
func NewScanner(r io.Reader) *PointScanner
func (*PointScanner) Scan ¶
func (s *PointScanner) Scan() (Token, string)
Scan returns the next token and literal value.
type TimestampParser ¶
type TimestampParser struct {
// contains filtered or unexported fields
}
type ValueParser ¶
type ValueParser struct{}
type WhiteSpaceParser ¶
type WhiteSpaceParser struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.