codec

package
v1.14.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 10, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewJSONCodec

func NewJSONCodec(schemes ...*scheme.Scheme) converter.PayloadCodec

NewJSONCodec initializes a new Codec value from one or more Scheme values

func NewProtoJSONCodec

func NewProtoJSONCodec(schemes ...*scheme.Scheme) converter.PayloadCodec

NewProtoJSONCodec initializes a new Codec value from one or more Scheme values

Types

type JSONCodec

type JSONCodec struct {
	// contains filtered or unexported fields
}

JSONCodec implements a converter.PayloadCodec that provides conversion between binary/protobuf and json/plain encodings. It can be used in conjunction with converter.NewPayloadCodecHTTPHandler to implement a Remote Codec Server.

func (*JSONCodec) Decode

func (c *JSONCodec) Decode(payloads []*common.Payload) ([]*common.Payload, error)

Decode converts all binary/protobuf encoded payloads with registered message types to json/protobuf encoding to support Temporal UI automatic decoding. Any payloads with other encoding, or unregistered types are left unmodified.

func (*JSONCodec) Encode

func (c *JSONCodec) Encode(payloads []*common.Payload) ([]*common.Payload, error)

Encode converts all json/plain encoded payloads with registered message types to binary/protobuf encoding prior to being forwarded to Temporal.

type ProtoJSONCodec

type ProtoJSONCodec struct {
	// contains filtered or unexported fields
}

ProtoJSONCodec implements a converter.PayloadCodec that provides conversion between binary/protobuf and json/protobuf encodings. It can be used in conjunction with converter.NewPayloadCodecHTTPHandler to implement a Remote Codec Server.

func (*ProtoJSONCodec) Decode

func (c *ProtoJSONCodec) Decode(payloads []*common.Payload) ([]*common.Payload, error)

Decode converts all binary/protobuf encoded payloads with registered message types to json/protobuf encoding to support Temporal UI automatic decoding. Any payloads with other encoding, or unregistered types are left unmodified.

func (*ProtoJSONCodec) Encode

func (c *ProtoJSONCodec) Encode(payloads []*common.Payload) ([]*common.Payload, error)

Encode converts all json/protobuf encoded payloads with registered message types to binary/protobuf encoding prior to being forwarded to Temporal.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL