redis-backoff
Exponential backoff using redis. Designed specifically for passwords.
Example
var backoff = client: ; app
API
var backoff = new Backoff(options)
client
- athen-redis
clientbackoff
- a custom backoff function of the form#retries -> millisecond timeout
.
backoff.check(keys).then( retryAfter => )
Checks all the keys whether to backoff. Returns the time to wait in milliseconds.
backoff.push(keys).then( => )
Add a bad try to all the keys. The lock period starts from the current time.
backoff.clear(keys).then( => )
Clear all retries from the keys.