Skip to content

Releases: rcdmk/go-ratelimiter

0.2.0

27 Jun 00:58
Compare
Choose a tag to compare

Changed

  • StdLib middleware now allows providing a custom cache provider
  • StdLib middleware returns rate limit headers even if request is allowed

Full Changelog: v0.1.0...v0.2.0

0.1.0

29 May 01:42
Compare
Choose a tag to compare

Added

  • ratelimiter package brings a generic rate limiter implementation that can be used as base for any use case.
  • ratelimitermiddleware.StdLib implements the rate limiter for the standard lib http package.
  • ratelimitermiddleware.StdLib adds standard RateLimit-Limit, RateLimit-Remaining, RateLimit-Reset and Retry-After headers to the response when blocking a request.
  • cache.GetterSetter interface provices a mean for specifying a cache implementation for the rate limiter.
  • cache.InMemory is a default implementation for caching that supports TTL and uses standard maps as backing storage. This implementation is used by default if no implementation is provided.

Full Changelog: https://github.com/rcdmk/go-ratelimiter/commits/v0.1.0