batchemitter

package
v3.8.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2018 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BatchEmitter

type BatchEmitter struct {
	*baseemitter.BaseEmitter

	Measurements []*measurement.Measurement
	// contains filtered or unexported fields
}

BatchEmitter gathers a batch of telegraf measurements that can be modified and then emitted

func NewEmitter

func NewEmitter() *BatchEmitter

NewEmitter returns a new BatchEmitter that gathers a batch of telegraf measurements so they can be modified and then emitted

func (*BatchEmitter) Add

func (b *BatchEmitter) Add(m string, fields map[string]interface{},
	tags map[string]string, metricType datapoint.MetricType,
	originalMetricType string, t ...time.Time)

Add parses measurements from telegraf and saves them to the struct member Measurements

func (*BatchEmitter) Send

func (b *BatchEmitter) Send()

Send the metrics in the batch through the agent

Jump to

Keyboard shortcuts

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