ratelimit

package
v0.0.0-...-719f63a Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HeaderXRateLimitLimit     = "X-RateLimit-Limit"
	HeaderXRateLimitRemaining = "X-RateLimit-Remaining"
	HeaderXRateLimitReset     = "X-RateLimit-Reset"
)

Variables

This section is empty.

Functions

func ExtractorFuncByURLPath

func ExtractorFuncByURLPath(httpRequest interface{}) (string, error)

func RateLimit

func RateLimit(cfg *RateLimitConfig) echo.MiddlewareFunc

Types

type RateLimitConfig

type RateLimitConfig struct {
	ExtractorFunc func(interface{}) (string, error)
	Impl          ratelimiting.RateLimitingInf
}

Jump to

Keyboard shortcuts

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