limiter

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package limiter 处理限流逻辑

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckRate

func CheckRate(c *gin.Context, key string) (limiterlib.Context, error)

CheckRate 检测请求是否超额

func GetKeyIP

func GetKeyIP(c *gin.Context) string

GetKeyIP 获取 Limitor 的 Key,IP

func GetKeyRouteWithIP

func GetKeyRouteWithIP(c *gin.Context) string

GetKeyRouteWithIP Limitor 的 Key,路由+IP,针对单个路由做限流

func InitLimiter

func InitLimiter()

Types

This section is empty.

Jump to

Keyboard shortcuts

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