-
Notifications
You must be signed in to change notification settings - Fork 0
YaRateLimit #10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
YaRateLimit #10
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces "YaRateLimit", a fixed-window rate limiter implementation backed by a yacache.Cache. The rate limiter tracks per-user, per-group request counts within time windows and provides functionality to check if users should be banned when they exceed defined limits.
Key changes:
- Added complete rate limiter implementation with fixed-window algorithm
- Implemented comprehensive test suite covering all major functionality
- Provided clear documentation and examples for the public API
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 7 comments.
| File | Description |
|---|---|
| yaratelimit/yaratelimit.go | Core rate limiter implementation with interfaces, storage format, and all rate limiting logic |
| yaratelimit/yaratelimit_test.go | Comprehensive test suite covering increment, refresh, overflow, ban detection, and utility functions |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
No description provided.