metric

package
v0.0.0-...-29da2f4 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2019 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChannelCollector

type ChannelCollector chan<- Datum

ChannelCollector is a collector that sends data directly to a chan. If the chan is full, the collector will block.

func (ChannelCollector) Record

func (cc ChannelCollector) Record(datum Datum)

type Collector

type Collector interface {
	Record(datum Datum)
}

Collector is something that a source invokes to send metrics.

type Datum

type Datum struct {
	Name   string
	Time   time.Time
	Tags   map[string]string
	Fields map[string]interface{}
}

Datum is a data point extracted by a source plugin. Its shape follows the InfluxDB Wire Protocol.

func (Datum) ToInfluxDBWireProtocol

func (m Datum) ToInfluxDBWireProtocol() (string, error)

type MetricTagOverrideCollector

type MetricTagOverrideCollector struct {
	Inner      Collector
	MetricTags map[string]string
}

MetricTagOverrideCollector wraps another Collector, but modifies the data passing through by appending or overriding the given MetricTags.

func (MetricTagOverrideCollector) Record

func (collector MetricTagOverrideCollector) Record(datum Datum)

Jump to

Keyboard shortcuts

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