inter

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2019 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Metric

type Metric struct {
	Name      string
	Value     interface{}
	Units     string
	Timestamp int64
}

Metric holds log analysis result set

type MetricOp

type MetricOp struct {
	Prefix    string
	Suffix    string
	Separator string
}

MetricOp defines some common operation to metric

func (*MetricOp) GetMetricName

func (op *MetricOp) GetMetricName(metric *Metric) string

GetMetricName returns the operated name of a metric, the operation includes adding prefix and adding suffix now

type Output

type Output interface {
	Init(prefix, suffix, options string, dryRun bool, logger zerolog.Logger) error
	Submit(metrics []*Metric) error
}

Output defines an interface of metric sending target

type Parser

type Parser interface {
	Init(options string) error
	ParseLine(line string) error
	GetState(duration float64) ([]*Metric, error)
}

Parser defines an interface to a log parser

Jump to

Keyboard shortcuts

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