Skip to content

Limiter v4 Checklist #92

@novln

Description

@novln

This is a checklist of refactoring, enhancements and/or features that I would like to take in the next major version of limiter:

  • Remove panic in DefaultErrorHandler: people may not have a recover middleware, and I would prefer that they overwrite the default behavior than relying on potential capture.
  • Reset precision: It seems some people use this library as a client-side limiter. The current reset mechanism is not great for burst because you could miss some tick if your rate period is in second. This is caused by an imprecise conversion from a TTL to a Unix timestamp.
  • Change rate limit dynamically: Few peoples have asked how we can change/update the rate limit "on the fly". I think it's a great feature.
  • Enable "client" mode: This limiter was designed for a server with HTTP. It's a shame that we can't use it properly as a "client" flavor.
  • Refactor GetContextFromState: We don't need time.Time for expiration and now is unused.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions