middleware

package
v1.10.1 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RedisIPRateLimiter

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

RedisIPRateLimiter is the redis store that implements IP Based rate limiter

func NewRedisIPRateLimiter

func NewRedisIPRateLimiter(redisClient *redis.Client, rate limiter.Rate, excludedIPs []string) (redisLimiter RedisIPRateLimiter, err error)

NewRedisIPRateLimiter initializes RedisIPRateLimiter

func (RedisIPRateLimiter) Limit

func (r RedisIPRateLimiter) Limit() echo.MiddlewareFunc

Limit limit request by IP

Jump to

Keyboard shortcuts

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