tlv

package
v0.0.0-...-8aeccdc Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// BO defines the byte order used to marshal records.
	BO = binary.BigEndian
)

Functions

func Marshal

func Marshal(r slog.Record) ([]byte, error)

Marshal encodes a slog.Record into binary data.

func Unmarshal

func Unmarshal(data []byte) (r slog.Record, err error)

Unmarshal decodes a slog.Record from the data.

Types

type Type

type Type uint8

Type specifies value type.

const (
	TypeTime Type = iota
	TypeMessage
	TypeLevel
	TypeSource
	TypeAttr
)

Serialization types.

func (Type) String

func (i Type) String() string

type VType

type VType uint32

VType specifies attribute value types.

const (
	VTypeAny VType = iota
	VTypeBool
	VTypeDuration
	VTypeFloat64
	VTypeGroup
	VTypeInt32
	VTypeInt64
	VTypeString
	VTypeTime
	VTypeUint64
)

Value types.

func (VType) String

func (i VType) String() string

Jump to

Keyboard shortcuts

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