feat: add ratelimiter package
What does this MR do?
First part of #627 (closed).
Adds a ratelimiter
package using an lru.Cache
that holds a "golang.org/x/time/rate".Limiter
per source IP.
The rest of the functionality will be added in subsequent MRs.
TODO
-
I added the Changelog
trailer (e.g.Changelog: feature
) to the commits that need to be included in the changelog -
I added unit tests or they are not required -
I added acceptance tests or they are not required -
I added documentation (or it's not required) -
I followed code review guidelines -
I followed Go Style guidelines
Edited by Jaime Martinez