Skip to content

Fix rate limiter docs#2366

Merged
aldas merged 2 commits into
labstack:masterfrom
yagikota:fix/rate-limiter-behavior
Dec 17, 2022
Merged

Fix rate limiter docs#2366
aldas merged 2 commits into
labstack:masterfrom
yagikota:fix/rate-limiter-behavior

Conversation

@yagikota

@yagikota yagikota commented Dec 16, 2022

Copy link
Copy Markdown
Contributor

Closes #1853

What I did

  • fix docs and comment in rate_limiter.go

Why

  • It is difficult to understand the behavior of middleware.NewRateLimiterMemoryStore when the argument is a float number.

Need to do

@yagikota yagikota marked this pull request as ready for review December 16, 2022 20:17

@aldas aldas left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@yagikota

Copy link
Copy Markdown
Contributor Author

I think it is better to add code example when rate is float number to doc.

@aldas
What do you think about it?

@aldas

aldas commented Dec 16, 2022

Copy link
Copy Markdown
Contributor

Sounds ok to me. Add it to this PR and I'll merge it.

@yagikota

Copy link
Copy Markdown
Contributor Author

Add it to this PR and I'll merge it.

What does this mean?

This document is in the different repository from this one, so I think we need to create a new PR about document fixing on this repo.

@aldas

aldas commented Dec 17, 2022

Copy link
Copy Markdown
Contributor

silly me. sorry, my bad. I was distracted yesterday and forgot what repo this was and where there docs are located. Just create PR at echox. Thanks!

@aldas aldas merged commit 895121d into labstack:master Dec 17, 2022
@yagikota

Copy link
Copy Markdown
Contributor Author

No problem.
So, I'll create PR at echox.

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.

RateLimiter rejects all events when Limit is between 0 and 1

2 participants