slidingwindowlimiter

package
v0.0.0-...-c8ac7db Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	WindowSize           = 5
	LRUSize              = 5000
	LimitFlagSize        = 3000
	MGETTimeOut          = 1
	IncrBy               = 1
	HealthCheckThreshold = 10
	BGTaskInterval       = 5
	SegeSize             = 10000
	IncrScript           = `` /* 268-byte string literal not displayed */

)

Variables

This section is empty.

Functions

This section is empty.

Types

type SlidingWindowLimiter

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

func NewSlidingWindowLimiter

func NewSlidingWindowLimiter(limitWant *entry.LimitWant) *SlidingWindowLimiter

func (*SlidingWindowLimiter) Take

func (s *SlidingWindowLimiter) Take(info *entry.LimitInfo) (bool, error)

Jump to

Keyboard shortcuts

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