ratelimiter

package module
v0.0.0-...-569da76 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Middleware

type Middleware struct {
	RateLimit     string
	RedisClient   *redis.Client
	RedisDB       int
	RedisHost     string
	RedisPassword string
	RedisPort     int
	RedisPrefix   string
}

func New

func New() *Middleware

func (*Middleware) Handler

func (m *Middleware) Handler() gin.HandlerFunc

func (*Middleware) Register

func (m *Middleware) Register()

func (*Middleware) SetRedisClient

func (m *Middleware) SetRedisClient(redisClient *redis.Client)

Jump to

Keyboard shortcuts

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