3 releases
0.1.2 | Mar 26, 2021 |
---|---|
0.1.1 | Mar 19, 2021 |
0.1.0 | Dec 7, 2020 |
#1273 in Asynchronous
14KB
286 lines
dynamodb-mutex-rs
Mutex Lock Using DynamoDB.
Changes
- 0.1.2 updated tokio 1
- 0.1.1 add remove
- 0.1.0 first release
Examples
use dynamodb_mutex::{
error::DynamoDbMutexError,
DynamoDbMutex,
};
use dynamodb_mutex::rusoto_core::Region;
#[tokio::main]
async fn main() -> Result<(), DynamoDbMutexError> {
let mutex = DynamoDbMutex::new(Region::UsEast1, 10000, 10000, 10000, None);
//mutex.make_table().await?;
let res = mutex.lock("test").await?;
println!("{:?}", res);
mutex.unlock("test", true).await?;
Ok(())
}
Dependencies
~9–20MB
~254K SLoC