metricsink

package
v0.20.0-alpha3 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2016 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MetricSink

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

A simple in-memory storage for metrics. It divides metrics into 2 categories * metrics that need to be stored for couple minutes. * metrics that need to be stored for longer time (15 min, 1 hour). The user of this struct needs to decide what are the long-stored metrics uprfront.

func NewMetricSink

func NewMetricSink(shortStoreDuration, longStoreDuration time.Duration, longStoreMetrics []string) *MetricSink

func (*MetricSink) ExportData

func (this *MetricSink) ExportData(batch *core.DataBatch)

func (*MetricSink) GetMetric

func (this *MetricSink) GetMetric(metricName string, keys []string, start, end time.Time) map[string][]TimestampedMetricValue

func (*MetricSink) GetMetricNames

func (this *MetricSink) GetMetricNames(key string) []string

func (*MetricSink) GetMetricSetKeys

func (this *MetricSink) GetMetricSetKeys() []string

* For debugging only.

func (*MetricSink) GetNamespaces

func (this *MetricSink) GetNamespaces() []string

func (*MetricSink) GetNodes

func (this *MetricSink) GetNodes() []string

func (*MetricSink) GetPods

func (this *MetricSink) GetPods() []string

func (*MetricSink) GetPodsFromNamespace

func (this *MetricSink) GetPodsFromNamespace(namespace string) []string

func (*MetricSink) GetShortStore

func (this *MetricSink) GetShortStore() []*core.DataBatch

func (*MetricSink) GetSystemContainersFromNode

func (this *MetricSink) GetSystemContainersFromNode(node string) []string

func (*MetricSink) Name

func (this *MetricSink) Name() string

func (*MetricSink) Stop

func (this *MetricSink) Stop()

type TimestampedMetricValue

type TimestampedMetricValue struct {
	core.MetricValue
	Timestamp time.Time
}

Jump to

Keyboard shortcuts

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