wire

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Marshaller

type Marshaller struct {
}

Marshaller marshals and unmarshals messages.

func NewMarshaller

func NewMarshaller() Marshaller

NewMarshaller creates marshaller.

func (Marshaller) ApplyPatch

func (m Marshaller) ApplyPatch(msg any, buf []byte) (retSize uint64, retErr error)

ApplyPatch applies patch.

func (Marshaller) ID

func (m Marshaller) ID(msg any) (uint64, error)

ID returns ID of message type.

func (Marshaller) IsPatchNeeded added in v0.3.0

func (m Marshaller) IsPatchNeeded(msgDst, msgSrc any) (bool, error)

IsPatchNeeded checks if non-empty patch exists.

func (Marshaller) MakePatch

func (m Marshaller) MakePatch(msgDst, msgSrc any, buf []byte) (retID, retSize uint64, retErr error)

MakePatch creates a patch.

func (Marshaller) Marshal

func (m Marshaller) Marshal(msg any, buf []byte) (retID, retSize uint64, retErr error)

Marshal marshals message.

func (Marshaller) Messages

func (m Marshaller) Messages() []any

Messages returns list of the message types supported by marshaller.

func (Marshaller) Size

func (m Marshaller) Size(msg any) (uint64, error)

Size computes the size of marshalled message.

func (Marshaller) Unmarshal

func (m Marshaller) Unmarshal(id uint64, buf []byte) (retMsg any, retSize uint64, retErr error)

Unmarshal unmarshals message.

type MsgCertificate

type MsgCertificate struct {
	Certificate []byte
}

MsgCertificate is used to deliver TLS certificates to HTTP services.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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