@codesoul-co/hypha-adapters-local / session-queue
- Package index:
@codesoul-co/hypha-adapters-local - Source:
packages/adapters-local/src/session-queue.ts - Exports: 2
Using this module
Use the Session queue module for using the public contracts and operations for this capability boundary. It exports 1 class, 1 interface.
Import from the package entrypoint
ts
import {
SQLiteSessionQueue,
} from '@codesoul-co/hypha-adapters-local';
import type {
SQLiteSessionQueueOptions,
} from '@codesoul-co/hypha-adapters-local';Usage patterns
- Use the 1 type/interface export as static contracts in application code, adapters, or tests. Import them with
import type; they do not exist at runtime. - The module exposes 1 class as constructable runtime implementations. Each symbol entry lists its constructor and public methods.
Public exports
| Symbol | Kind | Signature | Description |
|---|---|---|---|
SQLiteSessionQueue | class | new SQLiteSessionQueue(options: SQLiteSessionQueueOptions): SQLiteSessionQueue | SQLite Session Queue class with 15 public constructor or member entries; its exact declarations are listed below. |
SQLiteSessionQueueOptions | interface | interface SQLiteSessionQueueOptions | SQLite Session Queue Options interface with 10 public fields or methods. |
SQLiteSessionQueue
SQLite Session Queue class with 15 public constructor or member entries; its exact declarations are listed below.
- Kind: class
- Import:
import { SQLiteSessionQueue } from '@codesoul-co/hypha-adapters-local'; - Source module:
session-queue
Declaration
text
export declare class SQLiteSessionQueue implements SessionQueue {
constructor(options: SQLiteSessionQueueOptions);
enqueue(request: EnqueueSessionCommandRequest): Promise<SessionCommandRecord>;
claim(request: ClaimSessionCommandRequest): Promise<SessionCommandRecord | null>;
renew(request: RenewSessionCommandRequest): Promise<SessionCommandClaim>;
complete(request: CompleteSessionCommandRequest): Promise<void>;
fail(request: FailSessionCommandRequest): Promise<void>;
release(request: ReleaseSessionCommandRequest): Promise<void>;
list(request: ListSessionCommandsRequest): Promise<SessionCommandRecord[]>;
cancelPending(request: CancelSessionCommandsRequest): Promise<CancelSessionCommandsResult>;
redriveDeadLetter(request: RedriveDeadLetterSessionCommandRequest): Promise<SessionCommandRecord>;
closeDeadLetter(request: CloseDeadLetterSessionCommandRequest): Promise<SessionCommandRecord>;
listStuck(request: ListStuckSessionCommandsRequest): Promise<StuckSessionCommand[]>;
drain(scope: SessionQueueScope): Promise<void>;
health(): Promise<ProviderHealth & {
details: SessionQueueHealthSnapshot;
}>;
close(): void;
}Public members
| Member | Kind | Signature | Description |
|---|---|---|---|
cancelPending | method | cancelPending(request: CancelSessionCommandsRequest): Promise<CancelSessionCommandsResult> | Public method; parameters and return type are shown in the signature. |
claim | method | claim(request: ClaimSessionCommandRequest): Promise<SessionCommandRecord | null> | Public method; parameters and return type are shown in the signature. |
close | method | close(): void | Public method; parameters and return type are shown in the signature. |
closeDeadLetter | method | closeDeadLetter(request: CloseDeadLetterSessionCommandRequest): Promise<SessionCommandRecord> | Public method; parameters and return type are shown in the signature. |
complete | method | complete(request: CompleteSessionCommandRequest): Promise<void> | Public method; parameters and return type are shown in the signature. |
constructor | constructor | (options: SQLiteSessionQueueOptions): SQLiteSessionQueue | Creates an instance of this class. |
drain | method | drain(scope: SessionQueueScope): Promise<void> | Public method; parameters and return type are shown in the signature. |
enqueue | method | enqueue(request: EnqueueSessionCommandRequest): Promise<SessionCommandRecord> | Public method; parameters and return type are shown in the signature. |
fail | method | fail(request: FailSessionCommandRequest): Promise<void> | Public method; parameters and return type are shown in the signature. |
health | method | health(): Promise<ProviderHealth & { details: SessionQueueHealthSnapshot; }> | Public method; parameters and return type are shown in the signature. |
list | method | list(request: ListSessionCommandsRequest): Promise<SessionCommandRecord[]> | Public method; parameters and return type are shown in the signature. |
listStuck | method | listStuck(request: ListStuckSessionCommandsRequest): Promise<StuckSessionCommand[]> | Public method; parameters and return type are shown in the signature. |
redriveDeadLetter | method | redriveDeadLetter(request: RedriveDeadLetterSessionCommandRequest): Promise<SessionCommandRecord> | Public method; parameters and return type are shown in the signature. |
release | method | release(request: ReleaseSessionCommandRequest): Promise<void> | Public method; parameters and return type are shown in the signature. |
renew | method | renew(request: RenewSessionCommandRequest): Promise<SessionCommandClaim> | Public method; parameters and return type are shown in the signature. |
SQLiteSessionQueueOptions
SQLite Session Queue Options interface with 10 public fields or methods.
- Kind: interface
- Import:
import type { SQLiteSessionQueueOptions } from '@codesoul-co/hypha-adapters-local'; - Source module:
session-queue
Declaration
text
export interface SQLiteSessionQueueOptions {
filename: string;
now?: () => string;
duplicatePolicy?: 'reuse' | 'reject';
maxPendingPerSession?: number;
maxPendingPerUser?: number;
maxPendingGlobal?: number;
maxConcurrentSessions?: number;
maxConcurrentSessionsPerUser?: number;
priorityAgingMs?: number;
drainPollMs?: number;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
drainPollMs | property | drainPollMs?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
duplicatePolicy | property | duplicatePolicy?: "reuse" | "reject" | Public property; its type, readonly modifier and optionality are shown in the signature. |
filename | property | filename: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
maxConcurrentSessions | property | maxConcurrentSessions?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
maxConcurrentSessionsPerUser | property | maxConcurrentSessionsPerUser?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
maxPendingGlobal | property | maxPendingGlobal?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
maxPendingPerSession | property | maxPendingPerSession?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
maxPendingPerUser | property | maxPendingPerUser?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
now | method | now?(): string | Public method; parameters and return type are shown in the signature. |
priorityAgingMs | property | priorityAgingMs?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
