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

✨ feat: Add Max Func to Limiter Middleware #3070

Merged

Conversation

luk3skyw4lker
Copy link
Contributor

Description

This PR adds a MaxCalcualtor parameter to the limiter middleware, allowing it to calculate different rate limits for different requests, if no function is provided, the cfg.Max parameter is used as a returning value.

Fixes #3065

Type of change

  • New feature (non-breaking change which adds functionality)

Checklist

Before you submit your pull request, please make sure you meet these requirements:

  • Followed the inspiration of the Express.js framework for new functionalities, making them similar in usage.
  • Conducted a self-review of the code and provided comments for complex or critical parts.
  • Updated the documentation in the /docs/ directory for Fiber's documentation.
  • Added or updated unit tests to validate the effectiveness of the changes or new features.
  • Ensured that new and existing unit tests pass locally with the changes.
  • Verified that any new dependencies are essential and have been agreed upon by the maintainers/community.
  • Aimed for optimal performance with minimal allocations in the new code.
  • Provided benchmarks for the new code to analyze and improve upon.

Commit formatting

Please use emojis in commit messages for an easy way to identify the purpose or intention of a commit. Check out the emoji cheatsheet here: CONTRIBUTING.md

@luk3skyw4lker luk3skyw4lker requested a review from a team as a code owner July 11, 2024 19:44
@luk3skyw4lker luk3skyw4lker requested review from gaby, sixcolors, ReneWerner87 and efectn and removed request for a team July 11, 2024 19:44
Copy link
Contributor

coderabbitai bot commented Jul 11, 2024

Warning

Rate limit exceeded

@luk3skyw4lker has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 15 minutes and 59 seconds before requesting another review.

How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

Commits

Files that changed from the base of the PR and between 388cb79 and 7febbb9.

Walkthrough

A new feature, MaxFunc, has been introduced in the rate limiter middleware, allowing users to dynamically compute the maximum number of requests per context using a custom function. This enhancement greatly improves flexibility in managing request limits according to individual request parameters, making the rate limiting functionality more adaptable.

Changes

Files Change Summary
docs/middleware/limiter.md Added MaxFunc for dynamic max request limits and included an example for usage.
middleware/limiter/config.go Enhanced Config struct with MaxFunc, providing a default implementation.
middleware/limiter/limiter_fixed.go, middleware/limiter/limiter_sliding.go Updated FixedWindow and SlidingWindow middleware to calculate max using cfg.MaxFunc(c).
middleware/limiter/limiter_test.go Added tests for MaxFunc functionality, covering scenarios with zero and specified max values.

Assessment against linked issues

Objective Addressed Explanation
Support dynamic setting of Max parameter using a function (Issue #3065)

In code's embrace, limits flow anew,
Dynamic max for each request, it's true.
With MaxFunc, we now command,
Custom limits set by user’s hand.
Code evolves, the future’s bright,
Fiber’s path, now full of light! 🌟


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

codecov bot commented Jul 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.65%. Comparing base (8c3f81e) to head (7febbb9).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3070      +/-   ##
==========================================
+ Coverage   83.62%   83.65%   +0.02%     
==========================================
  Files         115      115              
  Lines        8332     8335       +3     
==========================================
+ Hits         6968     6973       +5     
+ Misses       1041     1040       -1     
+ Partials      323      322       -1     
Flag Coverage Δ
unittests 83.65% <100.00%> (+0.02%) ⬆️

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.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 58d07f0 and e1dc5dc.

Files selected for processing (4)
  • docs/middleware/limiter.md (3 hunks)
  • middleware/limiter/config.go (2 hunks)
  • middleware/limiter/limiter_fixed.go (4 hunks)
  • middleware/limiter/limiter_test.go (2 hunks)
Additional context used
LanguageTool
docs/middleware/limiter.md

[grammar] ~100-~100: The word ‘429’ seems to be an ordinal number with a missing ordinal indicator (‘st’, ‘nd’, ‘rd’ or ‘th’).
Context: ...g Expiration seconds before sending a 429 response. | 5 ...

(ORDINAL_NUMBER_MISSING_ORDINAL_INDICATOR)


[grammar] ~101-~101: The word ‘429’ seems to be an ordinal number with a missing ordinal indicator (‘st’, ‘nd’, ‘rd’ or ‘th’).
Context: ...g Expiration seconds before sending a 429 response. | A function which returns th...

(ORDINAL_NUMBER_MISSING_ORDINAL_INDICATOR)

golangci-lint
middleware/limiter/limiter_test.go

[high] 22-22: G404: Use of weak random number generator (math/rand or math/rand/v2 instead of crypto/rand)

(gosec)

GitHub Check: lint
middleware/limiter/limiter_test.go

[failure] 22-22:
G404: Use of weak random number generator (math/rand or math/rand/v2 instead of crypto/rand) (gosec)

Additional comments not posted (13)
middleware/limiter/limiter_fixed.go (4)

29-30: Use the MaxCalculator function to dynamically calculate the max value.

The max value is now calculated using the MaxCalculator function, providing flexibility for dynamic rate limits based on the request context.


65-65: Ensure remaining hits calculation is accurate.

The remaining hits calculation logic is correct and ensures the correct number of remaining hits is returned.


73-73: Check hits exceed max value condition.

The logic correctly checks if the current hits exceed the max value, ensuring proper rate limiting behavior.


101-101: Set RateLimit headers dynamically.

The X-RateLimit-Limit, X-RateLimit-Remaining, and X-RateLimit-Reset headers are set dynamically based on the calculated max value and remaining hits, ensuring accurate rate limit information is provided to the client.

middleware/limiter/config.go (2)

21-26: Add MaxCalculator function to Config struct.

The MaxCalculator function is added to the Config struct to allow dynamic calculation of the max requests supported by the rate limiter middleware.


112-116: Set default MaxCalculator function.

The default MaxCalculator function is set to return the Max value from the config if no function is provided, ensuring backward compatibility and default behavior.

docs/middleware/limiter.md (5)

46-48: Add MaxCalculator example to documentation.

The example demonstrates how to configure the MaxCalculator function to dynamically determine the max requests for the rate limiter middleware.


80-93: Document the dynamic limit feature with MaxCalculator.

The new section accurately describes the dynamic limit feature using the MaxCalculator function and provides a clear example for users.


122-124: Add default MaxCalculator function to documentation.

The default MaxCalculator function is correctly documented, ensuring users understand the default behavior.


101-101: Correct grammatical issue with 429 response.

The word "429" should include an ordinal indicator.

- A function to calculate the max number of recent connections during `Expiration` seconds before sending a 429 response.
+ A function to calculate the max number of recent connections during `Expiration` seconds before sending a 429th response.

Likely invalid or redundant comment.

Tools
LanguageTool

[grammar] ~101-~101: The word ‘429’ seems to be an ordinal number with a missing ordinal indicator (‘st’, ‘nd’, ‘rd’ or ‘th’).
Context: ...g Expiration seconds before sending a 429 response. | A function which returns th...

(ORDINAL_NUMBER_MISSING_ORDINAL_INDICATOR)


100-101: Correct grammatical issue with 429 response.

The word "429" should include an ordinal indicator.

- Max number of recent connections during `Expiration` seconds before sending a 429 response.
+ Max number of recent connections during `Expiration` seconds before sending a 429th response.

Likely invalid or redundant comment.

Tools
LanguageTool

[grammar] ~100-~100: The word ‘429’ seems to be an ordinal number with a missing ordinal indicator (‘st’, ‘nd’, ‘rd’ or ‘th’).
Context: ...g Expiration seconds before sending a 429 response. | 5 ...

(ORDINAL_NUMBER_MISSING_ORDINAL_INDICATOR)


[grammar] ~101-~101: The word ‘429’ seems to be an ordinal number with a missing ordinal indicator (‘st’, ‘nd’, ‘rd’ or ‘th’).
Context: ...g Expiration seconds before sending a 429 response. | A function which returns th...

(ORDINAL_NUMBER_MISSING_ORDINAL_INDICATOR)

middleware/limiter/limiter_test.go (2)

5-5: Import necessary packages for testing.

The necessary packages for testing are correctly imported.


18-63: Add test for MaxCalculator feature.

The new test function Test_Limiter_With_Max_Calculator correctly tests the functionality of the MaxCalculator feature, ensuring it works as expected with concurrency checks.

Tools
golangci-lint

[high] 22-22: G404: Use of weak random number generator (math/rand or math/rand/v2 instead of crypto/rand)

(gosec)

GitHub Check: lint

[failure] 22-22:
G404: Use of weak random number generator (math/rand or math/rand/v2 instead of crypto/rand) (gosec)

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between e1dc5dc and 9e008c8.

Files selected for processing (1)
  • middleware/limiter/limiter_test.go (2 hunks)
Files skipped from review as they are similar to previous changes (1)
  • middleware/limiter/limiter_test.go

@ReneWerner87 ReneWerner87 added this to the v3 milestone Jul 11, 2024
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 9e008c8 and d232508.

Files selected for processing (2)
  • docs/middleware/limiter.md (3 hunks)
  • middleware/limiter/limiter_test.go (1 hunks)
Files skipped from review as they are similar to previous changes (1)
  • middleware/limiter/limiter_test.go
Additional context used
LanguageTool
docs/middleware/limiter.md

[grammar] ~101-~101: The word ‘429’ seems to be an ordinal number with a missing ordinal indicator (‘st’, ‘nd’, ‘rd’ or ‘th’).
Context: ...g Expiration seconds before sending a 429 response. | 5 ...

(ORDINAL_NUMBER_MISSING_ORDINAL_INDICATOR)


[grammar] ~102-~102: The word ‘429’ seems to be an ordinal number with a missing ordinal indicator (‘st’, ‘nd’, ‘rd’ or ‘th’).
Context: ...g Expiration seconds before sending a 429 response. | A function which returns th...

(ORDINAL_NUMBER_MISSING_ORDINAL_INDICATOR)

Additional comments not posted (5)
docs/middleware/limiter.md (5)

46-48: LGTM!

The addition of the MaxCalculator parameter in the example configuration is clear and aligns with the PR objectives.


81-94: LGTM!

The documentation for dynamic limit calculation using the MaxCalculator parameter is clear and provides a useful example.


123-125: LGTM!

The default implementation of the MaxCalculator parameter in the ConfigDefault section is clear and consistent with the PR objectives.


101-101: Correct the grammatical issue.

The word ‘429’ should have an ordinal indicator (‘th’).

- Max number of recent connections during `Expiration` seconds before sending a 429 response.
+ Max number of recent connections during `Expiration` seconds before sending a 429th response.

Likely invalid or redundant comment.

Tools
LanguageTool

[grammar] ~101-~101: The word ‘429’ seems to be an ordinal number with a missing ordinal indicator (‘st’, ‘nd’, ‘rd’ or ‘th’).
Context: ...g Expiration seconds before sending a 429 response. | 5 ...

(ORDINAL_NUMBER_MISSING_ORDINAL_INDICATOR)


102-102: Correct the grammatical issue.

The word ‘429’ should have an ordinal indicator (‘th’).

- A function to calculate the max number of recent connections during `Expiration` seconds before sending a 429 response.
+ A function to calculate the max number of recent connections during `Expiration` seconds before sending a 429th response.

Likely invalid or redundant comment.

Tools
LanguageTool

[grammar] ~102-~102: The word ‘429’ seems to be an ordinal number with a missing ordinal indicator (‘st’, ‘nd’, ‘rd’ or ‘th’).
Context: ...g Expiration seconds before sending a 429 response. | A function which returns th...

(ORDINAL_NUMBER_MISSING_ORDINAL_INDICATOR)

docs/middleware/limiter.md Outdated Show resolved Hide resolved
@ReneWerner87
Copy link
Member

@luk3skyw4lker don´t forget https://github.com/gofiber/fiber/blob/main/middleware/limiter/limiter_sliding.go

@gaby gaby changed the title ✨ feat: add max calculator to limiter middleware ✨ feat: Add Max Calculator to Limiter Middleware Jul 16, 2024
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between d232508 and 8cad8bf.

Files selected for processing (2)
  • docs/middleware/limiter.md (3 hunks)
  • middleware/limiter/limiter_sliding.go (3 hunks)
Additional context used
LanguageTool
docs/middleware/limiter.md

[grammar] ~101-~101: The word ‘429’ seems to be an ordinal number with a missing ordinal indicator (‘st’, ‘nd’, ‘rd’ or ‘th’).
Context: ...g Expiration seconds before sending a 429 response. | 5 ...

(ORDINAL_NUMBER_MISSING_ORDINAL_INDICATOR)


[grammar] ~102-~102: The word ‘429’ seems to be an ordinal number with a missing ordinal indicator (‘st’, ‘nd’, ‘rd’ or ‘th’).
Context: ...g Expiration seconds before sending a 429 response. | A function which returns th...

(ORDINAL_NUMBER_MISSING_ORDINAL_INDICATOR)

Additional comments not posted (7)
middleware/limiter/limiter_sliding.go (3)

31-31: Dynamic calculation of max value using MaxCalculator.

The introduction of MaxCalculator allows for dynamic calculation of the max value based on the request context, which enhances flexibility. This change aligns with the PR objectives and the linked issue's requirements.


34-34: Condition for middleware execution updated.

The condition to skip middleware execution is updated to consider the dynamically calculated max value. This ensures that the middleware behaves correctly under the new configuration where max can be 0, effectively disabling the rate limiting.


132-132: Conversion of max value to string before setting the header.

The max value is now correctly converted to a string using strconv.Itoa(max) before setting the xRateLimitLimit header. This is necessary because HTTP headers must be strings. The change is well-implemented and ensures the correct operation of the middleware.

docs/middleware/limiter.md (4)

46-48: Example usage of MaxCalculator in documentation.

The documentation provides a clear example of how to use the MaxCalculator feature. This example aligns with the new functionality introduced in the PR and helps users understand how to implement dynamic rate limiting.


89-93: Detailed example of dynamic limit calculation.

This section provides a detailed example of using MaxCalculator to dynamically calculate limits based on the request's context. It's a valuable addition to the documentation as it guides users on implementing custom logic for rate limiting.


102-102: Update of MaxCalculator type in the Config table.

The type of MaxCalculator has been correctly updated in the documentation to reflect its function signature. This change ensures that the documentation is consistent with the code changes and provides accurate information to the users.

Tools
LanguageTool

[grammar] ~102-~102: The word ‘429’ seems to be an ordinal number with a missing ordinal indicator (‘st’, ‘nd’, ‘rd’ or ‘th’).
Context: ...g Expiration seconds before sending a 429 response. | A function which returns th...

(ORDINAL_NUMBER_MISSING_ORDINAL_INDICATOR)


123-125: Default value for MaxCalculator in ConfigDefault.

The documentation correctly shows the default implementation of MaxCalculator, which returns a fixed value. This is important for users to understand the default behavior if they do not provide a custom function.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 8cad8bf and 2ae8eb8.

Files selected for processing (4)
  • middleware/limiter/config.go (2 hunks)
  • middleware/limiter/limiter_fixed.go (4 hunks)
  • middleware/limiter/limiter_sliding.go (3 hunks)
  • middleware/limiter/limiter_test.go (1 hunks)
Files skipped from review as they are similar to previous changes (3)
  • middleware/limiter/limiter_fixed.go
  • middleware/limiter/limiter_sliding.go
  • middleware/limiter/limiter_test.go
Additional comments not posted (2)
middleware/limiter/config.go (2)

21-26: Addition of MaxFunc field is well-implemented.

The new MaxFunc field allows for dynamic calculation of the maximum requests supported by the rate limiter middleware. This addition enhances flexibility.


112-116: Default implementation for MaxFunc ensures backward compatibility.

The configDefault function now includes a default implementation for MaxFunc that returns the value of Max. This approach maintains backward compatibility and avoids additional checks within the middleware.

docs/middleware/limiter.md Outdated Show resolved Hide resolved
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 2ae8eb8 and 9c0980e.

Files selected for processing (1)
  • docs/middleware/limiter.md (3 hunks)
Additional context used
LanguageTool
docs/middleware/limiter.md

[grammar] ~101-~101: The word ‘429’ seems to be an ordinal number with a missing ordinal indicator (‘st’, ‘nd’, ‘rd’ or ‘th’).
Context: ...g Expiration seconds before sending a 429 response. | 5 ...

(ORDINAL_NUMBER_MISSING_ORDINAL_INDICATOR)


[grammar] ~102-~102: The word ‘429’ seems to be an ordinal number with a missing ordinal indicator (‘st’, ‘nd’, ‘rd’ or ‘th’).
Context: ...g Expiration seconds before sending a 429 response. | A function which returns th...

(ORDINAL_NUMBER_MISSING_ORDINAL_INDICATOR)

Additional comments not posted (4)
docs/middleware/limiter.md (4)

46-48: Example for MaxFunc looks good!

The example for the MaxFunc parameter is clear and demonstrates how to use the new feature effectively.


81-94: Dynamic limit section is well-explained!

The new section explaining the MaxFunc parameter is clear and provides a good example. It helps users understand how to use the new feature effectively.


123-125: Default implementation for MaxFunc looks good!

The default implementation for the MaxFunc parameter is correct and follows best practices.


102-102: Correct the type of MaxFunc in the Config table.

The type of MaxFunc should be func(fiber.Ctx) int instead of int.

- | MaxFunc                | `int`                     | A function to calculate the max number of recent connections during `Expiration` seconds before sending a 429 response. | A function which returns the cfg.Max    |
+ | MaxFunc                | `func(fiber.Ctx) int`     | A function to calculate the max number of recent connections during `Expiration` seconds before sending a 429 response. | A function which returns the cfg.Max    |

Likely invalid or redundant comment.

Tools
LanguageTool

[grammar] ~102-~102: The word ‘429’ seems to be an ordinal number with a missing ordinal indicator (‘st’, ‘nd’, ‘rd’ or ‘th’).
Context: ...g Expiration seconds before sending a 429 response. | A function which returns th...

(ORDINAL_NUMBER_MISSING_ORDINAL_INDICATOR)

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 9c0980e and 388cb79.

Files selected for processing (1)
  • middleware/limiter/config.go (2 hunks)
Files skipped from review as they are similar to previous changes (1)
  • middleware/limiter/config.go

@luk3skyw4lker luk3skyw4lker changed the title ✨ feat: Add Max Calculator to Limiter Middleware ✨ feat: Add Max Func to Limiter Middleware Jul 23, 2024
@ReneWerner87 ReneWerner87 merged commit 011c8f8 into gofiber:main Jul 23, 2024
16 of 17 checks passed
@luk3skyw4lker luk3skyw4lker deleted the feat/add-max-calculator-limiter branch July 23, 2024 21:03
gaby pushed a commit that referenced this pull request Jul 25, 2024
* feat: add max calculator to limiter middleware

* docs: update docs including the new parameter

* refactor: add new line before go code in docs

* fix: use crypto/rand instead of math/rand on tests

* test: add new test with zero set as limit

* fix: repeated tests failing when generating random limits

* fix: wrong type of MaxCalculator in docs

* feat: include max calculator in limiter_sliding

* refactor: rename MaxCalculator to MaxFunc

* docs: update docs with MaxFunc parameter

* tests: rename tests and add test for limiter sliding
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

🤗 [Question]: limiter supports dynamic setting of “Max” parameter
4 participants