aggregation

package
v0.0.0-...-95b71d7 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2018 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckInArray

func CheckInArray(str string, array []string) (isInArray bool)

func CheckSubArray

func CheckSubArray(subArray []string, array []string) (isSubArray bool)

func NewWindow

func NewWindow() map[string]MetricHolder

Types

type MetricCache

type MetricCache struct {
	Windows map[int64]map[string]MetricHolder
}

func NewMetricCache

func NewMetricCache() MetricCache

type MetricHolder

type MetricHolder interface {
	InitValue(models.MetricEnvelope)
	UpdateValue(models.MetricEnvelope)
	GetMetric() models.MetricEnvelope
	SetTimestamp(float64)
	// contains filtered or unexported methods
}

func CreateMetricType

func CreateMetricType(aggSpec models.AggregationSpecification, metricEnv models.MetricEnvelope) MetricHolder

type Rule

func NewAggregationRule

func NewAggregationRule(aggSpec models.AggregationSpecification) (Rule, error)

func (*Rule) AddMetric

func (a *Rule) AddMetric(metricEnvelope models.MetricEnvelope, windowSize time.Duration)

func (*Rule) GetMetrics

func (a *Rule) GetMetrics(eventTime int64) []models.MetricEnvelope

func (*Rule) MatchesMetric

func (a *Rule) MatchesMetric(newMetric models.MetricEnvelope) bool

Jump to

Keyboard shortcuts

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