Help us shape the future of Go! Take the 2026 Go Developer Survey

header

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HeaderInlineEverythingFlag      = 0
	HeaderSelfDescribingFlag        = 1
	HeaderOutOfBandFieldErrorsFlag  = 2
	HeaderSelfDescribingErrorsFlag  = 3
	HeaderNullTerminatedStringsFlag = 4
	HeaderNoDeduplicationFlag       = 5
	HeaderHasUserFlagsFlag          = 6
)

Public constants for header flags

Variables

This section is empty.

Functions

This section is empty.

Types

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

Header represents the Argo message header.

func NewHeader

func NewHeader() *Header

NewHeader creates a new Header.

func (*Header) AsBytes

func (h *Header) AsBytes() ([]byte, error)

AsBytes serializes the header to a byte slice.

func (*Header) GetFlag

func (h *Header) GetFlag(flag int) bool

GetFlag returns the boolean value of a given header flag.

func (*Header) Read

func (h *Header) Read(reader buf.Read) error

Read reads the header from the provided Read buffer. It updates the Header's internal state (flags, userFlags). It also advances the position of the buffer.

func (*Header) SetFlag

func (h *Header) SetFlag(flag int, value bool)

SetFlag sets the boolean value of a given header flag.

func (*Header) SetUserFlags

func (h *Header) SetUserFlags(bs *bitset.BitSet)

SetUserFlags sets the user flags BitSet. This also sets or unsets the HeaderHasUserFlagsFlag bit accordingly.

func (*Header) UserFlags

func (h *Header) UserFlags() *bitset.BitSet

UserFlags returns the user flags BitSet.

func (*Header) Write

func (h *Header) Write(writer buf.Write) error

Write writes the header to the provided Write buffer.

Jump to

Keyboard shortcuts

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