Versions in this module Expand all Collapse all v3 v3.0.0 Jan 12, 2024 Changes in this version + func Avg[T Numeric](_ context.Context, w Window[T]) T + func Count[T Numeric](_ context.Context, w Window[T]) T + func FastPercentile[T Numeric](perc float64) func(_ context.Context, w Window[T]) T + func Max[T Numeric](_ context.Context, w Window[T]) T + func Min[T Numeric](_ context.Context, w Window[T]) T + func Percentile[T Numeric](perc float64) func(_ context.Context, w Window[T]) T + func Sum[T Numeric](_ context.Context, w Window[T]) T + type Numeric interface + type PointPolicy struct + func NewPointPolicy[T Numeric](window Window[T]) *PointPolicy[T] + func (w *PointPolicy[T]) Append(ctx context.Context, value T) + func (w *PointPolicy[T]) Reduce(ctx context.Context, f Reduction[T]) T + type PointPolicyConcurrent struct + func NewPointPolicyConcurrent[T Numeric](window Window[T]) *PointPolicyConcurrent[T] + func (self *PointPolicyConcurrent[T]) Append(ctx context.Context, value T) + func (self *PointPolicyConcurrent[T]) Reduce(ctx context.Context, f Reduction[T]) T + type Reduction func(ctx context.Context, w Window[T]) T + func MinimumPoints[T Numeric](points int, r Reduction[T]) Reduction[T] + type TimePolicy struct + func NewTimePolicy[T Numeric](window Window[T], bucketDuration time.Duration) *TimePolicy[T] + func (self *TimePolicy[T]) Append(ctx context.Context, value T) + func (self *TimePolicy[T]) AppendWithTimestamp(ctx context.Context, value T, timestamp time.Time) + func (self *TimePolicy[T]) Reduce(ctx context.Context, f Reduction[T]) T + func (self *TimePolicy[T]) ReduceWithTimestamp(ctx context.Context, f Reduction[T], timestamp time.Time) T + type TimePolicyConcurrent struct + func NewTimePolicyConcurrent[T Numeric](window Window[T], bucketDuration time.Duration) *TimePolicyConcurrent[T] + func (self *TimePolicyConcurrent[T]) Append(ctx context.Context, value T) + func (self *TimePolicyConcurrent[T]) AppendWithTimestamp(ctx context.Context, value T, timestamp time.Time) + func (self *TimePolicyConcurrent[T]) Reduce(ctx context.Context, f Reduction[T]) T + func (self *TimePolicyConcurrent[T]) ReduceWithTimestamp(ctx context.Context, f Reduction[T], timestamp time.Time) T + type Window [][]T + func NewPreallocatedWindow[T Numeric](buckets int, bucketSize int) Window[T] + func NewWindow[T Numeric](buckets int) Window[T] Other modules containing this package github.com/kevinconway/rolling github.com/kevinconway/rolling/v2