ratelimit

package
v0.0.0-...-7b0e155 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithLimiter

func WithLimiter(limiter *rate.Limiter, timeout time.Duration) gin.HandlerFunc

WithLimiter 限流中间件 limiter golang.org/x/time/rate 下的令牌桶限流器 timeout 获取令牌的超时时间,超时即视为获取失败,本次请求不做处理

Types

This section is empty.

Jump to

Keyboard shortcuts

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