aggregate

package
v0.1.11 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	OperationSum       = "sum"
	OperationAvg       = "avg"
	OperationMax       = "max"
	OperationMin       = "min"
	OperationCount     = "count"
	OperationRawValues = "raw_values"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Aggregate

type Aggregate struct {
	Definition api.AggregateDefinition
	// contains filtered or unexported fields
}

func (Aggregate) Cleanup

func (aggregate Aggregate) Cleanup(entry interface{})

func (*Aggregate) Evaluate

func (aggregate *Aggregate) Evaluate(entries []config.GenericMap) error

func (*Aggregate) FilterEntry

func (aggregate *Aggregate) FilterEntry(entry config.GenericMap) (error, NormalizedValues, Labels)

func (*Aggregate) GetMetrics

func (aggregate *Aggregate) GetMetrics() []config.GenericMap

func (*Aggregate) LabelsFromEntry

func (aggregate *Aggregate) LabelsFromEntry(entry config.GenericMap) (Labels, bool)

func (*Aggregate) UpdateByEntry

func (aggregate *Aggregate) UpdateByEntry(entry config.GenericMap, normalizedValues NormalizedValues, labels Labels) error

type Aggregates

type Aggregates struct {
	Aggregates []Aggregate
	// contains filtered or unexported fields
}

func NewAggregatesFromConfig

func NewAggregatesFromConfig(aggConfig *api.Aggregates) (Aggregates, error)

func (*Aggregates) AddAggregate

func (aggregates *Aggregates) AddAggregate(aggregateDefinition api.AggregateDefinition) []Aggregate

func (*Aggregates) Evaluate

func (aggregates *Aggregates) Evaluate(entries []config.GenericMap) error

func (*Aggregates) GetMetrics

func (aggregates *Aggregates) GetMetrics() []config.GenericMap

type GroupState

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

type Labels

type Labels map[string]string

type NormalizedValues

type NormalizedValues string

Jump to

Keyboard shortcuts

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