Type Alias KyselySemaphoreAdapterSettings

KyselySemaphoreAdapterSettings: {
    enableTransactions?: boolean;
    expiredKeysRemovalInterval?: ITimeSpan;
    kysely: Kysely<KyselySemaphoreTables>;
    shouldRemoveExpiredKeys?: boolean;
}

Configuration for KyselySemaphoreAdapter. Requires a Kysely instance typed with the semaphore schema. Call init() before using the adapter.

IMPORT_PATH: "@daiso-tech/core/semaphore/kysely-semaphore-adapter"

Type declaration

  • OptionalenableTransactions?: boolean
    import { Transaction } from "kysely"

    !(settings.kysely instanceof Transaction)
  • OptionalexpiredKeysRemovalInterval?: ITimeSpan
    import { TimeSpan } from "@daiso-tech/core/time-span";

    TimeSpan.fromMinutes(1)
  • kysely: Kysely<KyselySemaphoreTables>

    The Kysely database instance typed with the required semaphore tables.

  • OptionalshouldRemoveExpiredKeys?: boolean

    When true, a background task periodically removes expired semaphore records and their related slots. Set to false to disable automatic cleanup.

    true