Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RateLimiter ¶
type RateLimiter struct {
// contains filtered or unexported fields
}
RateLimiter manages rate limiting for incoming requests based on IP addresses. It enforces a minimum duration between allowed requests from the same IP.
func NewRateLimiter ¶
func NewRateLimiter(limit time.Duration) *RateLimiter
NewRateLimiter initializes a new RateLimiter with a specified rate limit.
Click to show internal directories.
Click to hide internal directories.