8000 fix: implement identify rate limiting for gateway sharding by topi314 · Pull Request #467 · disgoorg/disgo · GitHub
[go: up one dir, main page]

Skip to content

fix: implement identify rate limiting for gateway sharding - #467

Merged
topi314 merged 2 commits into
masterfrom
fix/correctly-ratelimit-sharding-startup
Aug 21, 2025
Merged

topi314 merged 2 commits into
masterfrom
fix/correctly-ratelimit-sharding-startup

Conversation

@topi314
@topi314 topi314 commented Aug 20, 2025
Copy link
Copy Markdown
Member

No description provided.

This comment was marked as outdated.

@topi314
topi314 requested a review from Copilot August 20, 2025 20:24
Copilot AI left a comment
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 to gateway/ package for better organization
  • Renames rate limiter methods from WaitBucket/UnlockBucket to Wait/Unlock for 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.

Comment thread sharding/shard_manager.go Resolved
Comment thread gateway/identify_rate_limiter_config.go Resolved
Comment thread gateway/identify_rate_limiter.go Resolved
@topi314
topi314 force-pushed the fix/correctly-ratelimit-sharding-startup branch from cf4fa3c to 2bfc3a6 Compare August 20, 2025 21:57
@topi314
topi314 merged commit b5c57a8 into master Aug 21, 2025
@topi314
topi314 deleted the fix/correctly-ratelimit-sharding-startup branch August 21, 2025 13:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants

0