Type Alias ISemaphoreStateMethods

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

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

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

Type declaration

  • Readonlyid: string

    The unique identifier for the slot holder (semaphore instance). Used to track which slots are acquired by this holder.

  • Readonlykey: IKey

    The unique identifier for this semaphore instance. Multiple semaphore instances with the same key share the same slot pool.

  • Readonlyttl: TimeSpan | null

    The time-to-live (TTL) duration before acquired slots automatically expire. null indicates slots do not expire and must be explicitly released.

  • getState:function