pkg2

package
v0.7.5 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// IDSubMsg is the ID of SubMsg message.
	IDSubMsg uint64 = iota + 1
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Marshaller added in v0.7.5

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

Marshaller marshals and unmarshals messages.

func NewMarshaller added in v0.7.5

func NewMarshaller(capacity uint64) Marshaller

NewMarshaller creates marshaller.

func (Marshaller) Marshal added in v0.7.5

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

Marshal marshals message.

func (Marshaller) Unmarshal added in v0.7.5

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

Unmarshal unmarshals message.

type SubMsg

type SubMsg struct {
	Value1 map[bool]string
	Value2 string
	Value3 uint16
}

SubMsg is used in tests.

func (*SubMsg) Marshal added in v0.7.5

func (m *SubMsg) Marshal(b []byte) uint64

Marshal marshals the structure.

func (*SubMsg) Size added in v0.7.5

func (m *SubMsg) Size() uint64

Size computes the required size of the buffer for marshaling the structure.

func (*SubMsg) Unmarshal added in v0.7.5

func (m *SubMsg) Unmarshal(
	b []byte,
) uint64

Unmarshal unmarshals the structure.

Directories

Path Synopsis
generator command

Jump to

Keyboard shortcuts

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