Documentation ¶
Index ¶
- Constants
- func New(limit int, timeFrame time.Duration, flags int) router.MiddlewareFunc
- func NewShared(limit int, timeFrame time.Duration, flags int) router.MiddlewareFunc
- func NewSharedWithCatch(limit int, timeFrame time.Duration, flags int, catch middleware.CatchFunc) router.MiddlewareFunc
- func NewWithCatch(limit int, timeFrame time.Duration, flags int, catch middleware.CatchFunc) router.MiddlewareFunc
- type Handler
Constants ¶
View Source
const ( Command = 1 << iota User Channel Server Global )
Variables ¶
This section is empty.
Functions ¶
func New ¶
Create a new limiter which does nothing when the limit is hit
func NewShared ¶
Create a new limiter shared across the application
func NewSharedWithCatch ¶
func NewSharedWithCatch(limit int, timeFrame time.Duration, flags int, catch middleware.CatchFunc) router.MiddlewareFunc
Create a new limiter shared across the application which calls "catch" if set when the limit is hit.
func NewWithCatch ¶
func NewWithCatch(limit int, timeFrame time.Duration, flags int, catch middleware.CatchFunc) router.MiddlewareFunc
Create a new limiter which calls "catch" if set when the limit is hit.
Types ¶
Click to show internal directories.
Click to hide internal directories.