Skip to content

Tags: go-redis/redis_rate

Tags

v10.0.1

chore: update dependencies

v10.0.0

chore: update import path

v9.1.2

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
update to go 1.17 and latest go-redis & testify (#66)

* update to latest dependencies

* update to latest dependencies

v9.1.1

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
enable allowN and allowAtMost to peek at contents (#47)

* add failing test for allowN increment of zero

* fix lua script to allow increment by zero (effectively peek)

In past versions of redis_rate, you could peek at the current state
in the redis limiter by calling allowN but not incrementing. The
move to lua script did not preserve this (unadvertised) ability.

This adds it back, the only issue was trying to SET a redis
row with an expiry of zero if the row didn't exist. Since the
caller doesn't want to increment at all, this changes the SET
to not be called if the value is absent.

* same test and fix for allowAtMost increment by zero

* add test for peeking after a write

v9.1.0

Update dependencies

v9.0.2

Update dependencies

v9.0.1

Less pointy

v9.0.0

Less pointy

v9.0.0-beta.1

Update go-redis

v9.0.0-alpha.4

Tweak API