Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Limiter ¶
type Limiter interface { // IsLimited checks if the given key is limited IsLimited(key interface{}) bool // Increment increments the counter Increment(key interface{}) // Remove clears key from all limits Remove(key interface{}) // Count returns the total amount of values // that are not expired Count(key interface{}) int }
Limiter is an interface to the limiterManager structure. use New(int, time.Duration) to instantiate a new limiter. See limiterManager (scroll down) for more information.
Click to show internal directories.
Click to hide internal directories.