ratelimit

package
v0.8.21 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RateLimit

type RateLimit struct {
	// LimitType can be All, IP or RealIP; default is All
	LimitType string        `cfg:"limit_type"`
	Requests  int           `cfg:"requests" default:"100"`
	Duration  time.Duration `cfg:"duration" default:"1m"`
}

func (*RateLimit) Middleware

func (m *RateLimit) Middleware() func(http.Handler) http.Handler

Jump to

Keyboard shortcuts

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