Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Limiter ¶
type Limiter struct {
// contains filtered or unexported fields
}
Limiter is an in-memory sliding-window rate limiter. It is intended as a single-node fallback when Redis is unavailable.
func (*Limiter) AllowNamed ¶
AllowNamed matches the auth adapter's RateLimiter interface. It uses a simple sliding window over the configured duration, pruning expired entries on each call and removing empty buckets to avoid unbounded memory growth.
Click to show internal directories.
Click to hide internal directories.