Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultRateLimitConfig = RateLimitConfig{ Skipper: middleware.DefaultSkipper, Limit: 3, }
DefaultRateLimitConfig defines the default limiter config
Functions ¶
func RateLimitMiddleware ¶
func RateLimitMiddleware() echo.MiddlewareFunc
RateLimitMiddleware returns a middleware for echo with default config
func RateLimitWithConfig ¶
func RateLimitWithConfig(config RateLimitConfig) echo.MiddlewareFunc
RateLimitWithConfig returns a middleware for echo with config
Types ¶
type RateLimitConfig ¶
type RateLimitConfig struct { // Skipper defines a function to skip middleware. Skipper middleware.Skipper Limit float64 }
RateLimitConfig defines the rate limiter config
Click to show internal directories.
Click to hide internal directories.