Type Alias ILockStateMethods

ILockStateMethods: {
    id: string;
    key: IKey;
    ttl: TimeSpan | null;
    getState(): Promise<ILockState>;
}

State and metadata methods for a lock instance. Provides read-only access to lock state and configuration properties.

IMPORT_PATH: "@daiso-tech/core/lock/contracts"

Type declaration

  • Readonlyid: string

    The unique identifier for this lock holder (lock instance). Used to identify who acquired the lock and prevent unauthorized release.

  • Readonlykey: IKey

    The unique identifier for the resource being locked. Multiple lock instances with the same key cannot be held simultaneously by different owners.

  • Readonlyttl: TimeSpan | null

    The time-to-live (TTL) duration before this lock automatically expires. null indicates the lock does not expire and must be explicitly released.

  • getState:function