sethvargo / go-limiter

A supersonic rate limiting package for Go with HTTP middleware.
Apache License 2.0
555 stars 40 forks source link

Limiting by Number Of Keys #48

Closed sundarv85 closed 1 month ago

sundarv85 commented 1 month ago

The limit of tokens per key is handled by go-limiter. Additionally I would like to also limit by the max number of keys itself. Is there an existing function for the same?

If not, could you expose the NumOfKeys() or Size() function as well from the Store?

sethvargo commented 1 month ago

Hi @sundarv85 - thank you for opening an issue. I largely consider this package and its API surface to be complete. If you'd like additional functionality, I recommend you fork and maintain your own copy. Thanks!