ratelimit

package
v0.0.0-...-07f0968 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BasicMware

func BasicMware(sesExists func(app.Tlbx) bool, sesID func(app.Tlbx) string, cache iredis.Pool, perMinute ...int) func(app.Tlbx)

func MeMware

func MeMware(cache iredis.Pool, perMinute ...int) func(app.Tlbx)

func Mware

func Mware(configs ...func(*Config)) func(app.Tlbx)

func NoMware

func NoMware(cache iredis.Pool, perMinute ...int) func(app.Tlbx)

Types

type Config

type Config struct {
	KeyGen      func(tlbx app.Tlbx) string
	PerMinute   int
	ExitOnError bool
	Pool        iredis.Pool
}

Jump to

Keyboard shortcuts

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