Skip to main content

nestrs_locks/
options.rs

1use crate::store::{SharedInMemoryLockStore, SharedLockStore};
2use std::time::Duration;
3
4#[derive(Clone)]
5pub struct LocksOptions {
6    pub store: SharedLockStore,
7    pub default_ttl: Duration,
8}
9
10impl Default for LocksOptions {
11    fn default() -> Self {
12        Self {
13            store: SharedInMemoryLockStore::new(),
14            default_ttl: Duration::from_secs(30),
15        }
16    }
17}