sliding_window

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2024 License: BSD-2-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const AlgorithmName = "sliding_window"

Variables

This section is empty.

Functions

func NewAlgorithm added in v0.0.11

func NewAlgorithm(rdb algorithm.Rediser) (algorithm.Algorithm, error)

Types

type SlidingWindow

type SlidingWindow struct {
	RDB algorithm.Rediser
}

func (*SlidingWindow) Allow

func (c *SlidingWindow) Allow(key string, limit algorithm.Limit) (r *algorithm.Result, err error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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