tdmsg

package
v0.0.0-...-9030cf3 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2025 License: Apache-2.0, BSD-3-Clause, MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TubeMQTDMsgV4MsgFormatSize     = 29
	TubeMQTDMsgV4MsgCountOffset    = 15
	TubeMQTDMsgV4MsgExtFieldOffset = 9
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DataItem

type DataItem struct {
	Length uint32
	Data   []byte
}

DataItem represents the parsed data.

type TubeMQTDMsg

type TubeMQTDMsg struct {
	IsNumBid   bool
	Version    int32
	CreateTime uint64
	MsgCount   uint32
	AttrCount  uint32
	Attr2Data  map[string][]*DataItem
}

TubeMQTDMsg represents the structure of td msg.

func New

func New(data []byte) (*TubeMQTDMsg, error)

New decodes a TubeMQTDMsg from the given bytes.

func (*TubeMQTDMsg) ParseAttrValue

func (m *TubeMQTDMsg) ParseAttrValue(attr string) (map[string]string, error)

ParseAttrValue parses the given attrs to a map of attr to value.

Jump to

Keyboard shortcuts

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