Crate lockserver

Crate lockserver 

Source
Expand description

§lockserver

A distributed lock server for coordinating access to shared resources across distributed systems.

§Features

  • Simple API for acquiring and releasing locks
  • HTTP API only (no TCP service)
  • Client library with ergonomic macros (lock_scope!)
  • Blocking and non-blocking lock acquisition

§Example

use lockserver::{LockManager, LockserverClient, lock_scope};
let manager = LockManager::new();
let client = LockserverClient::new_with_env(None::<String>, None::<String>, None::<String>);
lock_scope!(&client, "resource", {
    // critical section
});

Re-exports§

pub use client::LockGuard;
pub use client::LockserverClient;

Modules§

client

Macros§

lock_scope
Macro to acquire a distributed lock for a code block. Usage:

Structs§

LockManager

Enums§

LockError
Errors returned by the lock manager.