rslock
rslock copied to clipboard
Distributed locks in async Redis with support for lock extending (Redlock implementation)
Hi! I was thinking about refactoring `ttl` parameters to be of type `std::time::Duration` for a nicer API. Do you think this would be a welcoming change?
I started implementing similar functionality to this library yesterday and then discovered `rslock`. Since I'm already using Redis in my app for other things, it feels like I can't really...
- Refactor TTL and retry_delay to use Duration - Update example - Add unit test - Bump minor version closes #11
This resolve #13 But I found that `Lock` can be cloned. If one thread clone it and send it to an other thread, one thread might think it still locked...
Could you support the url of redis-cluser?
Allows for `.lock` and friends on `LockManager` to take various arguments - Backwards compatible (examples compiled before I changed to show) - Allows for strings, bytes, and arrays of both...
Similar to the `using` API in redlock - https://www.npmjs.com/package/redlock#usage ```rs rl.using("resource", ttl, async || { // ... }).await?; ```
Rebased and pulled from https://github.com/hexcowboy/rslock/pull/28
- Update `tokio`, `rand`, and `redis` to latest in `Cargo.toml` - Update usage of `rand` following deprecation warnings
I was implementing my own lock manager when i came across this library. since my code base is based on tokio and I dont want to bring in async-std, I...