Skip to content
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

[Access] Response limit tracker #6814

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

Guitarheroua
Copy link
Contributor

Closes: #6640

NOTE: this PR should be merged after #6798

Implements rate limiter for responses, that controller returns to client.

@codecov-commenter
Copy link

codecov-commenter commented Dec 13, 2024

Codecov Report

Attention: Patch coverage is 25.00000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 41.18%. Comparing base (72adf9e) to head (c10cef6).

Files with missing lines Patch % Lines
engine/access/rest/websockets/controller.go 25.00% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master    #6814   +/-   ##
=======================================
  Coverage   41.18%   41.18%           
=======================================
  Files        2109     2109           
  Lines      185660   185664    +4     
=======================================
+ Hits        76460    76467    +7     
+ Misses     102788   102784    -4     
- Partials     6412     6413    +1     
Flag Coverage Δ
unittests 41.18% <25.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@illia-malachyn illia-malachyn changed the title [Access] Responce limit tracker [Access] Response limit tracker Dec 13, 2024
@Guitarheroua Guitarheroua self-assigned this Dec 17, 2024
@peterargue
Copy link
Contributor

@Guitarheroua please address merge conflicts

@Guitarheroua Guitarheroua marked this pull request as ready for review December 30, 2024 14:10
@illia-malachyn illia-malachyn self-requested a review January 2, 2025 10:43
@@ -257,6 +261,11 @@ func (c *Controller) writeMessages(ctx context.Context) error {
return nil
}

// wait for the rate limiter to allow the next message write.
Copy link
Contributor

Choose a reason for hiding this comment

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

I feel like this is a redundant comment. The code is pretty clear

@peterargue peterargue requested a review from durkmurder January 2, 2025 17:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Access] Implement response limit tracker routine for ws controller
4 participants