fieldz

package
v18.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AgentKeyFieldName        = "agent_key"
	LastConnectedAtFieldName = "recently_connected_at"
	SecondsAgoFieldName      = "seconds_ago"
	AttributesFieldName      = "attrs"
)

Variables

This section is empty.

Functions

func ToMap

func ToMap(fields []Field) map[string]any

Types

type Field

type Field struct {
	Key   string
	Value any
}

Field represents a single key value pair for logging and error tracking purposes.

func AgentKey added in v18.1.0

func AgentKey(agentKey api.AgentKey) Field

func Attributes

func Attributes(attrs map[string]any) Field

func LastConnectedAt

func LastConnectedAt(timestamp time.Time) Field

func New

func New(key string, value any) Field

func SecondsAgo

func SecondsAgo(duration time.Duration) Field

func (*Field) IsEmpty

func (f *Field) IsEmpty() bool

Jump to

Keyboard shortcuts

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