ring

package
v0.0.0-...-4309684 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(*SlidingWindow)

func WithBucket

func WithBucket(bucket int) Option

WithBucket 设置窗口数

func WithInterval

func WithInterval(interval int64) Option

WithInterval 设置interval

func WithSize

func WithSize(size int64) Option

WithSize 设置size

type SlidingWindow

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

SlidingWindow 滑动窗口

func NewSlidingWindow

func NewSlidingWindow(opts ...Option) *SlidingWindow

NewSlidingWindow returns SlidingWindow object

func (*SlidingWindow) Exec

func (sw *SlidingWindow) Exec() bool

Exec 执行

Jump to

Keyboard shortcuts

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