Restate Typescript SDK
    Preparing search index...

    Type Alias JournalValueCodecExperimental

    Journal values codec.

    This allows to transform journal values after being serialized, before writing them to the wire.

    Values that are passed through the codec:

    • Handlers input and success output
    • ctx.run success results
    • Awakeables/Promise success results
    • State values
    type JournalValueCodec = {
        decode(buf: Uint8Array): Promise<Uint8Array<ArrayBufferLike>>;
        encode(buf: Uint8Array): Uint8Array;
    }
    Index

    Methods

    Methods

    • Decodes the given buffer.

      This will be applied before deserialization.

      Parameters

      • buf: Uint8Array

        The buffer to decode.

      Returns Promise<Uint8Array<ArrayBufferLike>>

      A promise that resolves to the decoded buffer.

    • Encodes the given buffer.

      This will be applied after serialization.

      Parameters

      • buf: Uint8Array

        The buffer to encode. Empty byte buffers should be appropriately handled as well.

      Returns Uint8Array

      The encoded buffer