nestrs-locks 1.7.0

Distributed lease locks for nestrs — NestJS @nestjs/locks parity.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use crate::store::{SharedInMemoryLockStore, SharedLockStore};
use std::time::Duration;

#[derive(Clone)]
pub struct LocksOptions {
    pub store: SharedLockStore,
    pub default_ttl: Duration,
}

impl Default for LocksOptions {
    fn default() -> Self {
        Self {
            store: SharedInMemoryLockStore::new(),
            default_ttl: Duration::from_secs(30),
        }
    }
}