Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RollingWindow ¶
type RollingWindow struct {
// contains filtered or unexported fields
}
func NewRollingWindow ¶
func NewRollingWindow(size int, interval time.Duration, opts ...RollingWindowOption) *RollingWindow
func (*RollingWindow) Add ¶
func (rw *RollingWindow) Add(v float64)
func (*RollingWindow) Reduce ¶
func (rw *RollingWindow) Reduce(fn func(b *Bucket))
type RollingWindowOption ¶
type RollingWindowOption func(rollingWindow *RollingWindow)
func IgnoreCurrentBucket ¶
func IgnoreCurrentBucket() RollingWindowOption
Click to show internal directories.
Click to hide internal directories.