@codesoul-co/hypha-harness / durable-event-store-bridge
- Package index:
@codesoul-co/hypha-harness - Source:
packages/harness/src/durable-event-store-bridge.ts - Exports: 3
Using this module
Use the Durable event store bridge module for creating, recording, or reading Event contracts. It exports 1 class, 2 interfaces.
Import from the package entrypoint
ts
import {
DurableEventStoreBridge,
} from '@codesoul-co/hypha-harness';
import type {
DurableEventStoreBridgeCoordination,
DurableEventStoreBridgeOptions,
} from '@codesoul-co/hypha-harness';Usage patterns
- Use the 2 type/interface exports 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 |
|---|---|---|---|
DurableEventStoreBridge | class | new DurableEventStoreBridge(options: DurableEventStoreBridgeOptions): DurableEventStoreBridge | Adapts the legacy append/list EventStore surface to canonical durable streams. It carries no Run state; every read is rebuilt from the durable Event Runtime. |
DurableEventStoreBridgeCoordination | interface | interface DurableEventStoreBridgeCoordination | Durable Event Store Bridge Coordination interface with 5 public fields or methods. |
DurableEventStoreBridgeOptions | interface | interface DurableEventStoreBridgeOptions | Durable Event Store Bridge Options interface with 4 public fields or methods. |
DurableEventStoreBridge
Adapts the legacy append/list EventStore surface to canonical durable streams. It carries no Run state; every read is rebuilt from the durable Event Runtime.
- Kind: class
- Import:
import { DurableEventStoreBridge } from '@codesoul-co/hypha-harness'; - Source module:
durable-event-store-bridge
Declaration
text
export declare class DurableEventStoreBridge implements EventStore, TraceRecorder {
constructor(options: DurableEventStoreBridgeOptions);
append(event: FrameworkEvent): Promise<void>;
record(event: FrameworkEvent): Promise<void>;
list(filter?: EventFilter): Promise<FrameworkEvent[]>;
}Public members
| Member | Kind | Signature | Description |
|---|---|---|---|
append | method | append(event: FrameworkEvent): Promise<void> | Public method; parameters and return type are shown in the signature. |
constructor | constructor | (options: DurableEventStoreBridgeOptions): DurableEventStoreBridge | Creates an instance of this class. |
list | method | list(filter?: EventFilter): Promise<FrameworkEvent[]> | Public method; parameters and return type are shown in the signature. |
record | method | record(event: FrameworkEvent): Promise<void> | Public method; parameters and return type are shown in the signature. |
DurableEventStoreBridgeCoordination
Durable Event Store Bridge Coordination interface with 5 public fields or methods.
- Kind: interface
- Import:
import type { DurableEventStoreBridgeCoordination } from '@codesoul-co/hypha-harness'; - Source module:
durable-event-store-bridge
Declaration
text
export interface DurableEventStoreBridgeCoordination {
runLeases: RunLeaseStore;
ownerId: string;
leaseTtlMs: number;
nextId(namespace: string): string;
now?: () => string;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
leaseTtlMs | property | leaseTtlMs: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
nextId | method | nextId(namespace: string): string | Public method; parameters and return type are shown in the signature. |
now | method | now?(): string | Public method; parameters and return type are shown in the signature. |
ownerId | property | ownerId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
runLeases | property | runLeases: RunLeaseStore | Public property; its type, readonly modifier and optionality are shown in the signature. |
DurableEventStoreBridgeOptions
Durable Event Store Bridge Options interface with 4 public fields or methods.
- Kind: interface
- Import:
import type { DurableEventStoreBridgeOptions } from '@codesoul-co/hypha-harness'; - Source module:
durable-event-store-bridge
Declaration
text
export interface DurableEventStoreBridgeOptions {
events: EventRuntime;
coordination?: DurableEventStoreBridgeCoordination;
maxAppendAttempts?: number;
streamHeadPageSize?: number;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
coordination | property | coordination?: DurableEventStoreBridgeCoordination | Public property; its type, readonly modifier and optionality are shown in the signature. |
events | property | events: EventRuntime | Public property; its type, readonly modifier and optionality are shown in the signature. |
maxAppendAttempts | property | maxAppendAttempts?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
streamHeadPageSize | property | streamHeadPageSize?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
