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

Way to know if the rate limit is unlimited #14

Closed
vzamanillo opened this issue Nov 24, 2022 · 2 comments · Fixed by #18
Closed

Way to know if the rate limit is unlimited #14

vzamanillo opened this issue Nov 24, 2022 · 2 comments · Fixed by #18
Assignees
Labels
Status: Completed Nothing further to be done with this issue. Awaiting to be closed. Type: Enhancement Most issues will probably ask for additions or changes.

Comments

@vzamanillo
Copy link

Could be useful having a method to now when the rate limit is unlimited or not.

@tarunKoyalwar
Copy link
Member

tarunKoyalwar commented Dec 13, 2022

@vzamanillo , can you share any use case perhaps ??

@vzamanillo
Copy link
Author

Maybe I am missing something but I think you can't currently know what was the raw input value for the rate limit nor when it is unlimited, would be useful to know that for checking when a rate limit is set / not set / overwritten.

Checking subfinder

imagen

after those lines of code the input raw value is lost.

Considering the Limiter is an object who mostly does his work based on an input integer value at least would expose a method to recover that value and (plus) to know when it was not set (unlimited).

Also I would change the way on how it is initialized, it's pretty weird having to check the input value to create a new instance of the limiter using New or NewUnlimited, there should be a single initialize entry point with the necessary logic to know what to do and make the initialization abstract.

@tarunKoyalwar tarunKoyalwar self-assigned this Dec 14, 2022
@tarunKoyalwar tarunKoyalwar linked a pull request Dec 14, 2022 that will close this issue
@Mzack9999 Mzack9999 added Type: Enhancement Most issues will probably ask for additions or changes. Status: Completed Nothing further to be done with this issue. Awaiting to be closed. labels Dec 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Completed Nothing further to be done with this issue. Awaiting to be closed. Type: Enhancement Most issues will probably ask for additions or changes.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants