Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Limiter ¶
Limiter is an interface for rate limiting functionality. It defines a method for taking a rate-limited action.
func NewLocalLimiter ¶
NewLocalLimiter creates a new local rate limiter with specified maximum and burstable requests per second.
type Redis ¶
type Redis struct {
*redis_rate.Limiter // Embedded Redis rate limiter
MaxRPS int // Maximum requests per second allowed
}
Redis represents a rate limiter using Redis.
Click to show internal directories.
Click to hide internal directories.