aggregator

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2018 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterFactory

func RegisterFactory(id string, factory Factory)

Register registers the specified aggregator

Types

type Aggregator

type Aggregator interface {
	Add(value float64) (report bool, result float64)
}

func NewBlockAverage

func NewBlockAverage(windowSize int) Aggregator

func NewMovingAverage

func NewMovingAverage(windowSize int) Aggregator

func NewTimeBlockAverage

func NewTimeBlockAverage(windowSize int) Aggregator

type BlockAverage

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

func (*BlockAverage) Add

func (ba *BlockAverage) Add(value float64) (bool, float64)

type Factory

type Factory func(windowSize int) Aggregator

func GetFactory

func GetFactory(id string) Factory

Get gets specified aggregator factory

type MovingAverage

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

func (*MovingAverage) Add

func (ma *MovingAverage) Add(value float64) (bool, float64)

type TimeBlockAverage

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

func (*TimeBlockAverage) Add

func (ta *TimeBlockAverage) Add(value float64) (bool, float64)

Jump to

Keyboard shortcuts

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