redis-lock

Crates.ioredis-lock
lib.rsredis-lock
version
sourcesrc
created_at2024-10-22 16:11:02.308022
updated_at2024-10-24 10:42:58.459356
descriptionRusty distributed locking backed by Redis.
homepage
repositoryhttps://github.com/JonathanWoollett-Light/redis-lock
max_upload_size
id1418889
Cargo.toml error:TOML parse error at line 17, column 1 | 17 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include`
size0
Jonathan Woollett-Light (JonathanWoollett-Light)

documentation

https://docs.rs/redis-lock/

README

redis-lock

Crates.io docs

Rusty distributed locking backed by Redis.

// Setup.
redis_lock::setup(&client).await?;
// Get lock.
let mut lock = redis_lock::MultiResourceLock::new(client.clone())?;
let resources = vec![String::from("account1"), String::from("account2")];
// Execute a function with the lock.
lock.map_default(&resources, async move { /* .. */ }).await?;

Vs rslock

I would recommend this library over rslock when your application does operations that require exclusive access to multiple resources.

Similar work

Commit count: 17

cargo fmt