A Rust Redlock implementation for distributed, highly-available redis locks.
toml
[dependencies]
rust_redlock = "0.4.0"
See: https://docs.rs/rustredlock/0.4.0/rustredlock
```rust let redlock = Redlock::new(Config { addrs: vec!["redis1.example.com", "redis2.example.com", "redis3.example.com"], retrycount: 10, retrydelay: time::Duration::frommillis(400), retryjitter: 400, drift_factor: 0.01, })?;
// Acquire the lock of the specified resource. let lock = redlock.lock("resourcename", time::Duration::frommillis(1000))?; // Release the lock of the resource when you are done. lock.unlock()?; ```