Repository navigation
fix: implement identify rate limiting for gateway sharding - #467
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull Request Overview
Refactors rate limiting implementation for Discord gateway sharding by moving identify rate limiting from the sharding package to the gateway package and standardizing method naming across rate limiters.
- Moves identify rate limiter code from
sharding/package togateway/package for better organization - Renames rate limiter methods from
WaitBucket/UnlockBuckettoWait/Unlockfor consistency - Updates shard management logic to pass rate limiter instance to individual gateway connections
Reviewed Changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| sharding/shard_rate_limiter_noop.go | Removes old noop rate limiter implementation |
| sharding/shard_rate_limiter_config.go | Removes old rate limiter configuration |
| sharding/shard_manager_config.go | Updates config to use gateway package rate limiter |
| sharding/shard_manager.go | Refactors shard opening logic and rate limiter usage |
| rest/rest_rate_limiter_noop.go | Updates method names and adds interface validation |
| rest/rest_rate_limiter.go | Renames rate limiter methods for consistency |
| rest/rest_client.go | Updates to use renamed rate limiter methods |
| gateway/identify_rate_limiter_test.go | Moves tests and updates for new package/API |
| gateway/identify_rate_limit 8000 er_noop.go | Adds new noop rate limiter in gateway package |
| gateway/identify_rate_limiter_config.go | Adds configuration for gateway rate limiter |
| gateway/identify_rate_limiter.go | Moves and refactors rate limiter implementation |
| gateway/gateway_config.go | Adds identify rate limiter configuration option |
| gateway/gateway.go | Integrates identify rate limiting into gateway connection logic |
| bot/config.go | Updates bot configuration to use new rate limiter API |
| _examples/sharding/example.go | Updates comments in example code |
| _examples/proxy/example.go | Updates to use new noop rate limiter from gateway package |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
topi314
force-pushed
the
fix/correctly-ratelimit-sharding-startup
branch
from
August 20, 2025 21:57
cf4fa3c to
2bfc3a6
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.