ratelimit

package
v1.0.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RedisClient *redis.Client

Functions

func AllowRequest

func AllowRequest(ctx context.Context, key string, limit int, window time.Duration) (bool, error)

func InitializeRedis

func InitializeRedis(addr, password string, db int) error

func RateLimitMiddleware

func RateLimitMiddleware(limit int, window time.Duration) gin.HandlerFunc

Types

This section is empty.

Jump to

Keyboard shortcuts

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