metric

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2017 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 upfront.

func NewMetricSink

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

func (*MetricSink) ExportData

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

func (*MetricSink) GetContainersForPodFromNamespace added in v1.1.0

func (this *MetricSink) GetContainersForPodFromNamespace(namespace, pod string) []string

func (*MetricSink) GetLabeledMetric added in v1.2.0

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

func (*MetricSink) GetLatestDataBatch added in v1.1.0

func (this *MetricSink) GetLatestDataBatch() *core.DataBatch

func (*MetricSink) GetMetric

func (this *MetricSink) GetMetric(metricName string, keys []string, start, end time.Time) map[string][]core.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()

Jump to

Keyboard shortcuts

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