@qualithm/kafka-client - v0.1.6
    Preparing search index...

    Type Alias ProtobufSchema

    A parsed Protobuf schema with encode/decode capabilities for a specific message type.

    type ProtobufSchema = {
        decode: (data: Uint8Array) => unknown;
        encode: (value: unknown) => Uint8Array;
        messageIndexes: readonly number[];
    }
    Index

    Properties

    decode: (data: Uint8Array) => unknown

    Decode Protobuf binary data to a value.

    encode: (value: unknown) => Uint8Array

    Encode a value to Protobuf binary format.

    messageIndexes: readonly number[]

    Message index path within the proto file.

    For the first (or only) message type, this is [0]. For nested or non-first message types, use the path of indexes (e.g. [1] for the second top-level message, [0, 2] for the third nested message within the first top-level message).