measurement

package
v4.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2019 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Measurement

type Measurement struct {
	Measurement        string
	Fields             map[string]interface{}
	Tags               map[string]string
	MetricType         datapoint.MetricType
	OriginalMetricType string
	Timestamps         []time.Time
}

Measurement is a storage struct for storing measurements from telegraf plugins

func New

func New(measurement string, fields map[string]interface{},
	tags map[string]string, metricType datapoint.MetricType,
	originalMetricType string, t ...time.Time) *Measurement

New creates a new measurement from telegraf measurement name, fields, tags, etc.

func (*Measurement) RenameFieldWithTag

func (m *Measurement) RenameFieldWithTag(tagName string, fieldName string, replacer *strings.Replacer)

RenameFieldWithTag - takes the value of a specified tag and uses it to rename a specified field the tag is deleted and the original field name is overwritten

Jump to

Keyboard shortcuts

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