defaultaggregator

package
v0.0.0-...-51da36d Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AggregatedConfig

type AggregatedConfig struct {
	KindMap map[string][]KindConfig
}

type AggregatorKind

type AggregatorKind int
const (
	SumKind AggregatorKind = iota
	MaxKind
	AvgKind
	LastKind
	CountKind
	HistogramKind
)

func GetAggregatorKind

func GetAggregatorKind(kind string) AggregatorKind

type CumulativeAggregator

type CumulativeAggregator struct {
	*DefaultAggregator
	MetricExpiration time.Duration
}

func NewCumulativeAggregator

func NewCumulativeAggregator(config *AggregatedConfig, metricExpiration time.Duration) *CumulativeAggregator

func (*CumulativeAggregator) AggregatorWithAllLabelsAndMetric

func (c *CumulativeAggregator) AggregatorWithAllLabelsAndMetric(g *model.DataGroup, now time.Time)

func (*CumulativeAggregator) DumpAndRemoveExpired

func (c *CumulativeAggregator) DumpAndRemoveExpired(now time.Time) []*model.DataGroup

type DefaultAggregator

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

func NewDefaultAggregator

func NewDefaultAggregator(config *AggregatedConfig) *DefaultAggregator

func (*DefaultAggregator) Aggregate

func (s *DefaultAggregator) Aggregate(g *model.DataGroup, selectors *aggregator.LabelSelectors)

func (*DefaultAggregator) CheckExist

func (s *DefaultAggregator) CheckExist(dataGroupName string) bool

func (*DefaultAggregator) Dump

func (s *DefaultAggregator) Dump() []*model.DataGroup

func (*DefaultAggregator) DumpSingle

func (s *DefaultAggregator) DumpSingle(dataGroupName string) []*model.DataGroup

type KindConfig

type KindConfig struct {
	OutputName string
	Kind       AggregatorKind
	// Only HistogramKind has this value
	ExplicitBoundaries []int64
}

Jump to

Keyboard shortcuts

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