Help us shape the future of Go! Take the 2026 Go Developer Survey

limiter

package
v2.4.4 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Limiter

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

Limiter 令牌桶限流器实现

func NewLimiter

func NewLimiter(cap, rate float64) *Limiter

func (*Limiter) Allow

func (l *Limiter) Allow(n ...int) bool

Jump to

Keyboard shortcuts

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