aggregation

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package aggregation implements aggregation functions to statistic a range of values.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromFieldValue added in v0.3.0

func FromFieldValue[N Number](fieldValue *modelv1.FieldValue) (N, error)

FromFieldValue transforms modelv1.FieldValue to Number.

func ToFieldValue added in v0.3.0

func ToFieldValue[N Number](value N) (*modelv1.FieldValue, error)

ToFieldValue transforms Number to modelv1.FieldValue.

Types

type Func added in v0.3.0

type Func[N Number] interface {
	In(N)
	Val() N
	Reset()
}

Func supports aggregation operations.

func NewFunc added in v0.3.0

func NewFunc[N Number](af modelv1.AggregationFunction) (Func[N], error)

NewFunc returns a aggregation function based on function type.

type Number added in v0.3.0

type Number interface {
	~int64 | ~float64
}

Number denotes the supported number types.

Jump to

Keyboard shortcuts

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