Interface IPersistSignalInstance

Per-context signal persistence instance interface. Scoped to a specific (symbol, strategyName, exchangeName) triple.

Custom adapters should implement this interface to override the default file-based signal persistence behavior.

interface IPersistSignalInstance {
    readSignalData(): Promise<ISignalRow>;
    waitForInit(initial: boolean): Promise<void>;
    writeSignalData(signalRow: ISignalRow): Promise<void>;
}

Implemented by

Methods

  • Read persisted signal data for this context.

    Returns Promise<ISignalRow>

    Promise resolving to signal or null if none persisted

  • Initialize storage for this signal context.

    Parameters

    • initial: boolean

      Whether this is the first initialization

    Returns Promise<void>

    Promise that resolves when initialization is complete

  • Write signal data for this context (null to clear).

    Parameters

    • signalRow: ISignalRow

      Signal data to persist, or null to clear

    Returns Promise<void>

    Promise that resolves when write is complete