@codesoul-co/hypha-memory / structured-lifecycle-task-store
- Package index:
@codesoul-co/hypha-memory - Source:
packages/memory/src/structured-lifecycle-task-store.ts - Exports: 2
Using this module
Use the Structured lifecycle task store module for persisting and reading data at this boundary. It exports 1 class, 1 interface.
Import from the package entrypoint
ts
import {
StructuredMemoryLifecycleTaskStore,
} from '@codesoul-co/hypha-memory';
import type {
StructuredMemoryLifecycleTaskStoreOptions,
} from '@codesoul-co/hypha-memory';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 |
|---|---|---|---|
StructuredMemoryLifecycleTaskStore | class | new StructuredMemoryLifecycleTaskStore(options: StructuredMemoryLifecycleTaskStoreOptions): StructuredMemoryLifecycleTaskStore | Structured Memory Lifecycle Task Store class with 7 public constructor or member entries; its exact declarations are listed below. |
StructuredMemoryLifecycleTaskStoreOptions | interface | interface StructuredMemoryLifecycleTaskStoreOptions | Structured Memory Lifecycle Task Store Options interface with 2 public fields or methods. |
StructuredMemoryLifecycleTaskStore
Structured Memory Lifecycle Task Store class with 7 public constructor or member entries; its exact declarations are listed below.
- Kind: class
- Import:
import { StructuredMemoryLifecycleTaskStore } from '@codesoul-co/hypha-memory'; - Source module:
structured-lifecycle-task-store
Declaration
text
export declare class StructuredMemoryLifecycleTaskStore implements MemoryLifecycleTaskStore {
constructor(options: StructuredMemoryLifecycleTaskStoreOptions);
enqueue(task: MemoryLifecycleTask): Promise<void>;
lease(type: MemoryLifecycleWorkerType, ownerId: string, now: string, leaseUntil: string, limit: number): Promise<MemoryLifecycleTask[]>;
renew(taskId: string, ownerId: string, leaseToken: string, now: string, leaseUntil: string): Promise<boolean>;
complete(taskId: string, ownerId: string, leaseToken: string, now: string): Promise<boolean>;
fail(taskId: string, ownerId: string, leaseToken: string, now: string, error: NormalizedMemoryError, retryAt: string, deadLetter: boolean): Promise<boolean>;
list(type?: MemoryLifecycleWorkerType): Promise<MemoryLifecycleTask[]>;
}Public members
| Member | Kind | Signature | Description |
|---|---|---|---|
complete | method | complete(taskId: string, ownerId: string, leaseToken: string, now: string): Promise<boolean> | Public method; parameters and return type are shown in the signature. |
constructor | constructor | (options: StructuredMemoryLifecycleTaskStoreOptions): StructuredMemoryLifecycleTaskStore | Creates an instance of this class. |
enqueue | method | enqueue(task: MemoryLifecycleTask): Promise<void> | Public method; parameters and return type are shown in the signature. |
fail | method | fail(taskId: string, ownerId: string, leaseToken: string, now: string, error: NormalizedMemoryError, retryAt: string, deadLetter: boolean): Promise<boolean> | Public method; parameters and return type are shown in the signature. |
lease | method | lease(type: MemoryLifecycleWorkerType, ownerId: string, now: string, leaseUntil: string, limit: number): Promise<MemoryLifecycleTask[]> | Public method; parameters and return type are shown in the signature. |
list | method | list(type?: MemoryLifecycleWorkerType): Promise<MemoryLifecycleTask[]> | Public method; parameters and return type are shown in the signature. |
renew | method | renew(taskId: string, ownerId: string, leaseToken: string, now: string, leaseUntil: string): Promise<boolean> | Public method; parameters and return type are shown in the signature. |
StructuredMemoryLifecycleTaskStoreOptions
Structured Memory Lifecycle Task Store Options interface with 2 public fields or methods.
- Kind: interface
- Import:
import type { StructuredMemoryLifecycleTaskStoreOptions } from '@codesoul-co/hypha-memory'; - Source module:
structured-lifecycle-task-store
Declaration
text
export interface StructuredMemoryLifecycleTaskStoreOptions {
store: StructuredStoreProvider;
table?: string;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
store | property | store: StructuredStoreProvider | Public property; its type, readonly modifier and optionality are shown in the signature. |
table | property | table?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
