metrictank: github.com/grafana/metrictank/input Index | Files | Directories

package input

import "github.com/grafana/metrictank/input"

Package in provides interfaces, concrete implementations, and utilities to ingest data into metrictank

Index

Package Files

input.go plugin.go

func ConfigSetup Uses

func ConfigSetup()

type DefaultHandler Uses

type DefaultHandler struct {
    // contains filtered or unexported fields
}

Default is a base handler for a metrics packet, aimed to be embedded by concrete implementations

func NewDefaultHandler Uses

func NewDefaultHandler(metrics mdata.Metrics, metricIndex idx.MetricIndex, input string) DefaultHandler

func (DefaultHandler) ProcessMetricData Uses

func (in DefaultHandler) ProcessMetricData(md *schema.MetricData, partition int32)

ProcessMetricData assures the data is stored and the metadata is in the index concurrency-safe.

func (DefaultHandler) ProcessMetricPoint Uses

func (in DefaultHandler) ProcessMetricPoint(point schema.MetricPoint, format msg.Format, partition int32)

ProcessMetricPoint updates the index if possible, and stores the data if we have an index entry concurrency-safe.

type Handler Uses

type Handler interface {
    ProcessMetricData(md *schema.MetricData, partition int32)
    ProcessMetricPoint(point schema.MetricPoint, format msg.Format, partition int32)
}

type Plugin Uses

type Plugin interface {
    Name() string
    // Start starts the plugin.
    // The plugin calls cancel should any non-recoverable error occur after Start has returned.
    // if Start returns an error, or cancel is called by the plugin,
    // the caller (e.g. main process) should shut down all its resources and exit.
    // Note that upon fatal close, metrictank will call Stop() on all plugins, also the one that triggered it.
    Start(handler Handler, cancel context.CancelFunc) error
    MaintainPriority()
    ExplainPriority() interface{}
    Stop() // Should block until shutdown is complete.
}

Directories

PathSynopsis
carbonpackage carbon provides a traditional carbon input for metrictank note: it does not support the "carbon2.0" protocol that serializes metrics2.0 into a plaintext carbon-like protocol
kafkamdm

Package input imports 12 packages (graph) and is imported by 6 packages. Updated 2020-07-15. Refresh now. Tools for package owners.