json

package
v1.2.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JSONFlattener

type JSONFlattener struct {
	Fields map[string]interface{}
}

func (*JSONFlattener) FlattenJSON

func (f *JSONFlattener) FlattenJSON(
	fieldname string,
	v interface{}) error

FlattenJSON flattens nested maps/interfaces into a fields map (ignoring bools and string)

func (*JSONFlattener) FullFlattenJSON

func (f *JSONFlattener) FullFlattenJSON(
	fieldname string,
	v interface{},
	convertString bool,
	convertBool bool,
) error

FullFlattenJSON flattens nested maps/interfaces into a fields map (including bools and string)

type JSONParser

type JSONParser struct {
	MetricName  string
	TagKeys     []string
	DefaultTags map[string]string
}

func (*JSONParser) Parse

func (p *JSONParser) Parse(buf []byte) ([]telegraf.Metric, error)

func (*JSONParser) ParseLine

func (p *JSONParser) ParseLine(line string) (telegraf.Metric, error)

func (*JSONParser) SetDefaultTags

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

Jump to

Keyboard shortcuts

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