Skip to content

Gcra has test_and_update but it is impossible to do these operations separately #187

@KirillLykov

Description

@KirillLykov

In the implementation of RateLimiter, Gcra structure is used. It has a method test_and_update, but there no operations test/update. I will explain the use case: assume we want to implement such rate limiter that when server receives initial packet from the client, we test that this client is not exceeded the rate limit but we update the rate limiter (increase counter) only when we decided to handle the connection. Maybe it is possible to implement rate limiter differently (let me know) with the current API but I cannot come up with a solution.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions