package
2.0.2
Repository: https://github.com/devexps/go-pkg.git
Documentation: pkg.go.dev

# Functions

Avg the values within the window.
Count sums the count value within the window.
Max the values within the window.
Min the values within the window.
NewRollingCounter creates a new RollingCounter bases on RollingCounterOpts.
NewRollingPolicy creates a new RollingPolicy based on the given window and RollingPolicyOpts.
NewWindow creates a new Window based on WindowOpts.
Sum the values within the window.

# Structs

Bucket contains multiple float64 points.
Iterator iterates the buckets within the window.
Options contains the arguments for creating Window.
RollingCounterOpts contains the arguments for creating RollingCounter.
RollingPolicy is a policy for ring window based on time duration.
RollingPolicyOpts contains the arguments for creating RollingPolicy.
Window contains multiple buckets.

# Interfaces

Aggregation contains some common aggregation function.
Metric is a sample interface.
RollingCounter represents a ring window based on time duration.