sink

package
v0.0.0-...-fff993b Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StdoutFlushPeriod = 5 * time.Second
)
View Source
const (
	SubmitPeriodSeconds = 5
)

Variables

This section is empty.

Functions

This section is empty.

Types

type MetricsSink

type MetricsSink interface {
	// Performs any necessary initialization, returning an error if something fails
	Init() error

	// Reports a count (this is a delta value)
	ReportCount(name string, value float64)

	// Reports the current value
	ReportValue(name string, value float64)

	// Reports another value for a distribution
	ReportDistribution(name string, value float64)
}

func FromConfig

func FromConfig(config *simetricsconfig.Config, log *logrus.Entry) MetricsSink

type MetricsSinkDogStatsD

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

func NewMetricsSinkDogStatsD

func NewMetricsSinkDogStatsD(address, sourceFormat string, log *logrus.Entry) *MetricsSinkDogStatsD

func (*MetricsSinkDogStatsD) Init

func (msl *MetricsSinkDogStatsD) Init() error

func (*MetricsSinkDogStatsD) ReportCount

func (msl *MetricsSinkDogStatsD) ReportCount(name string, value float64)

func (*MetricsSinkDogStatsD) ReportDistribution

func (msl *MetricsSinkDogStatsD) ReportDistribution(name string, value float64)

func (*MetricsSinkDogStatsD) ReportValue

func (msl *MetricsSinkDogStatsD) ReportValue(name string, value float64)

type MetricsSinkEmpty

type MetricsSinkEmpty struct{}

Doesn't do anything, very efficient

func (MetricsSinkEmpty) Init

func (mse MetricsSinkEmpty) Init() error

func (MetricsSinkEmpty) ReportCount

func (mse MetricsSinkEmpty) ReportCount(name string, value float64)

func (MetricsSinkEmpty) ReportDistribution

func (mse MetricsSinkEmpty) ReportDistribution(name string, value float64)

func (MetricsSinkEmpty) ReportValue

func (mse MetricsSinkEmpty) ReportValue(name string, value float64)

type MetricsSinkLibrato

type MetricsSinkLibrato struct {
	Email     string
	Token     string
	Namespace string
	Source    string // defaults to hostname
	// contains filtered or unexported fields
}

func NewMetricsSinkLibrato

func NewMetricsSinkLibrato(email, token, namespace, sourceFormat string, log *logrus.Entry) *MetricsSinkLibrato

func (*MetricsSinkLibrato) Init

func (msl *MetricsSinkLibrato) Init() error

func (*MetricsSinkLibrato) ReportCount

func (msl *MetricsSinkLibrato) ReportCount(name string, value float64)

func (*MetricsSinkLibrato) ReportDistribution

func (msl *MetricsSinkLibrato) ReportDistribution(name string, value float64)

func (*MetricsSinkLibrato) ReportValue

func (msl *MetricsSinkLibrato) ReportValue(name string, value float64)

type MetricsSinkStdout

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

func NewMetricsSinkStdout

func NewMetricsSinkStdout(log *logrus.Entry) *MetricsSinkStdout

func (*MetricsSinkStdout) Init

func (msl *MetricsSinkStdout) Init() error

func (*MetricsSinkStdout) ReportCount

func (msl *MetricsSinkStdout) ReportCount(name string, value float64)

func (*MetricsSinkStdout) ReportDistribution

func (msl *MetricsSinkStdout) ReportDistribution(name string, value float64)

func (*MetricsSinkStdout) ReportValue

func (msl *MetricsSinkStdout) ReportValue(name string, value float64)

Jump to

Keyboard shortcuts

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