Skip to content

TypeScript API / laikacms/locks/in-process / InProcessLockManagerOptions

Interface: InProcessLockManagerOptions ​

Properties ​

defaultTtlMs? ​

ts
optional defaultTtlMs?: number;

Lock lifetime when the caller does not specify one. Defaults to 5 minutes.


generateToken? ​

ts
optional generateToken?: () => string;

Token factory. Defaults to a 32-character CSPRNG string. Tokens are bearer capabilities, so this must stay unguessable; tests may override it.

Returns ​

string


now? ​

ts
optional now?: () => number;

Clock source, injectable so tests can drive expiry deterministically instead of sleeping. Defaults to Date.now.

Returns ​

number

Released under the MIT License.