@s2-dev/streamstore - v0.24.1
    Preparing search index...

    Interface ReadRecord<Format>

    Record read from a stream. The Format type parameter controls whether body and headers are decoded as strings or kept as binary.

    interface ReadRecord<Format extends "string" | "bytes" = "string"> {
        body: Format extends "string" ? string : Uint8Array<ArrayBufferLike>;
        headers: Format extends "string"
            ? readonly (readonly [string, string])[]
            : readonly (
                readonly [Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>]
            )[];
        seqNum: number;
        timestamp: Date;
    }

    Type Parameters

    • Format extends "string" | "bytes" = "string"
    Index

    Properties

    body: Format extends "string" ? string : Uint8Array<ArrayBufferLike>
    headers: Format extends "string"
        ? readonly (readonly [string, string])[]
        : readonly (
            readonly [Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>]
        )[]
    seqNum: number
    timestamp: Date

    Timestamp of the record.