Open canalun opened 1 year ago
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
is there any follow up regarding this issue? or can somebody provide some example to do it for perDay?
@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,
}
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...!