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

Add rate limiter to client #715

Merged
merged 5 commits into from Sep 30, 2023
Merged

Conversation

SVilgelm
Copy link
Contributor

Add a simple per client rate limiting based on Allow() bool interface

Continue work on #494

@SVilgelm
Copy link
Contributor Author

I'm unable to push directly to @dbriemann's PR, so had to create this one.
Changed to use an interface instead of x/time/rate, also rebased

@codecov
Copy link

codecov bot commented Sep 29, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (41199c3) 96.33% compared to head (d8914b2) 96.34%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #715      +/-   ##
==========================================
+ Coverage   96.33%   96.34%   +0.01%     
==========================================
  Files          12       12              
  Lines        1610     1616       +6     
==========================================
+ Hits         1551     1557       +6     
  Misses         37       37              
  Partials       22       22              
Files Coverage Δ
client.go 98.04% <100.00%> (+0.02%) ⬆️
util.go 94.44% <ø> (ø)

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

@jeevatkm jeevatkm added this to the v2.9.0 milestone Sep 30, 2023
Copy link
Member

@jeevatkm jeevatkm left a comment

Choose a reason for hiding this comment

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

Thank you @SVilgelm @dbriemann for your contribution 👍 appreciated!

@jeevatkm jeevatkm merged commit e52a7e0 into go-resty:master Sep 30, 2023
4 checks passed
@SVilgelm SVilgelm deleted the feature/rate_limiting branch September 30, 2023 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

None yet

3 participants