Type Alias ISemaphoreAdapter

ISemaphoreAdapter: {
    acquire(settings: SemaphoreAcquireSettings): Promise<boolean>;
    forceReleaseAll(key: string): Promise<boolean>;
    getState(key: string): Promise<null | ISemaphoreAdapterState>;
    refresh(key: string, slotId: string, ttl: TimeSpan): Promise<boolean>;
    release(key: string, slotId: string): Promise<boolean>;
}

The ISemaphoreAdapter contract defines a way for managing semaphores independent of the underlying technology. This contract is not meant to be used directly, instead you should use ISemaphoreProvider contract.

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

Type declaration