internal

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MetricImp

type MetricImp struct {
	// those unified fields is only kept for one replica in MetricImp,
	// and we will try to copy into types.Metric when corresponding functions are called.
	types.MetricMetaImp
	types.ObjectMetaImp

	sync.RWMutex
	// contains filtered or unexported fields
}

MetricImp is used as an internal version of metricItem.

func NewInternalMetric

func NewInternalMetric(m types.MetricMetaImp, o types.ObjectMetaImp) *MetricImp

func (*MetricImp) AddSeriesMetric

func (a *MetricImp) AddSeriesMetric(is *types.SeriesMetric) []*types.SeriesItem

func (*MetricImp) AggregateMetric

func (a *MetricImp) AggregateMetric()

AggregateMetric calculate the aggregated metric based on snapshot of current store

func (*MetricImp) Empty

func (a *MetricImp) Empty() bool

func (*MetricImp) GC

func (a *MetricImp) GC(expiredTimestamp int64)

func (*MetricImp) GenerateTags

func (a *MetricImp) GenerateTags() []metrics.MetricTag

func (*MetricImp) GetAggregatedItems

func (a *MetricImp) GetAggregatedItems(metricSelector labels.Selector, agg string) ([]types.Metric, bool)

func (*MetricImp) GetLatestTimestamp

func (a *MetricImp) GetLatestTimestamp() int64

GetLatestTimestamp returns the latest metric timestamp in milliseconds.

func (*MetricImp) GetSeriesItems

func (a *MetricImp) GetSeriesItems(metricSelector labels.Selector, latest bool) ([]*types.SeriesMetric, bool)

func (*MetricImp) Len

func (a *MetricImp) Len() int

func (*MetricImp) MergeAggregatedMetric

func (a *MetricImp) MergeAggregatedMetric(as *types.AggregatedMetric)

Jump to

Keyboard shortcuts

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