interface LockProvider { withLock<T>( key: string, ttlSeconds: number, fn: () => Promise<T>, ): Promise<T>;} Methods
withLock
withLock<T>(key: string, ttlSeconds: number, fn: () => Promise<T>): Promise<T> Parameters
- key: string
- ttlSeconds: number
- fn: () => Promise<T>
Returns Promise<T>
Distributed lock abstraction used for race-sensitive operations.