rs-zero 0.2.6

Rust-first microservice framework inspired by go-zero engineering practices
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//! Distributed lock building blocks.
//!
//! The first production backend is Redis `SET NX PX` plus token-checked Lua
//! release. Lock keys and owner tokens must never be used as metrics labels.

pub mod error;
#[cfg(feature = "cache-redis")]
pub mod redis;
pub mod traits;

pub use error::{LockError, LockResult};
#[cfg(feature = "cache-redis")]
pub use redis::{RedisDistributedLock, RedisLockConfig};
pub use traits::{DistributedLock, LockGuard};