@s2-dev/streamstore - v0.22.0
    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;
        headers: Format extends "string"
            ? readonly (readonly [string, string])[]
            : readonly (readonly [Uint8Array, Uint8Array])[];
        seqNum: number;
        timestamp: Date;
    }

    Type Parameters

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

    Properties

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

    Timestamp of the record.