Code Monkey home page Code Monkey logo

Comments (3)

tonytony2020 avatar tonytony2020 commented on August 12, 2024

Hi, thank you for developing this really useful rate limiter!! I'm now about to use this library๐Ÿ˜ƒ

And I thought what about supporting redis_rate.PerDay(). As you know, currently, we have only choices of PerSec(), PerMin() and PerHour(). However, some ppl (not only me, maybe) might wanna set limits per day.

If it doesn't sound like a bad idea, if I may, I would like to work on it๐Ÿ˜Š Would be really happy if you gave me a reply...!

you could walk around this issue
https://github.com/tonytony2020/redis_rate/wiki#usage

from redis_rate.

tanto-satu avatar tanto-satu commented on August 12, 2024

is there any follow up regarding this issue? or can somebody provide some example to do it for perDay?

from redis_rate.

tikhomirovv avatar tikhomirovv commented on August 12, 2024

@tanto-satu, I suppose it should be like this:

// limit := redis_rate.PerMinute(rate)
limit := redis_rate.Limit{
        Rate:   rate,
        Burst:  rate,
        Period: time.Hour * 24,
}

from redis_rate.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.