datagram

package module
v0.0.0-...-98dd8ec Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2022 License: Apache-2.0 Imports: 4 Imported by: 1

README

Packs and unpacks a set of keys and values into a CSV string that fits into one UDP packet (508 bytes)

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Datagram

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

func New

func New() Datagram

func Unpack

func Unpack(b []byte) (Datagram, error)

Unpack the CSV. Replaces missing values with empty strings.

func (*Datagram) Append

func (d *Datagram) Append(k, v string)

func (*Datagram) AppendTruncatable

func (d *Datagram) AppendTruncatable(k, v string)

func (*Datagram) GetNext

func (d *Datagram) GetNext() (k, v string)

func (Datagram) HasNext

func (d Datagram) HasNext() bool

func (*Datagram) InitIterator

func (d *Datagram) InitIterator()

func (*Datagram) Pack

func (d *Datagram) Pack() []byte

Jump to

Keyboard shortcuts

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