serialization

package
v4.0.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrMessageTypeNotAllowed       = errors.New("message type not allowed") // for topics that have lots of types we don't care about
	ErrSerializationFailure        = errors.New("serialization failure")
	ErrUnknownContentType          = errors.New("the content type provided was not understood")
	ErrMessageTypeNotFound         = errors.New("the message type provided was not understood")
	ErrDeserializeMalformedPayload = errors.New("the payload provided was not understood by the deserializer")
	ErrSerializeUnsupportedType    = errors.New("the type provided cannot be serialized")
)
View Source
var Options singleton

Functions

func New

func New(connector messaging.Connector, options ...option) messaging.Connector

Types

type DeliveryDecoder

type DeliveryDecoder interface {
	Decode(*messaging.Delivery) error
}

type Deserializer

type Deserializer interface {
	ContentType() string
	Deserialize(source []byte, instance interface{}) error
}

type DispatchEncoder

type DispatchEncoder interface {
	Encode(*messaging.Dispatch) error
}

type Serializer

type Serializer interface {
	ContentType() string
	Serialize(instance interface{}) ([]byte, error)
}

Jump to

Keyboard shortcuts

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