3 ms·
That's a neat little lib. One possible nitpick: the redis integration should be reconsidered. The limiter's interface provides a mechanism for someone using thi
by sidlls 7y ago
That's a neat little lib. One possible nitpick: the redis integration should be reconsidered. The limiter's interface provides a mechanism for someone using this library to implement their own integration, which permits flexibility in both the choice of redis client and usage of this code.
- russellluo 7y agoHi sidlls, thanks for your attention! If I understand you correctly, by saying "the redis integration should be reconsidered", you means the [RedisClient](https://godoc.org/github.com/RussellLuo/slidingwindow#RedisClient https://godoc.org/github.com/RussellLuo/slidingwindow#RedisC...) interface is [go-redis](https://github.com/go-redis/redis https://github.com/go-redis/redis) specific, is that right?
- sidlls 7y agoActually I mean if I were maintaining this I'd probably not include such an interface at all, and let users of the library decide it entirely.
- russellluo 7y agoI got it, thanks for your advice! `RedisDatastore` is entirely removed, and it only serves as a reference implementation in tests now.