Versions in this module Expand all Collapse all v0 v0.8.2 Sep 11, 2026 v0.8.1 Sep 11, 2026 v0.8.0 Sep 10, 2026 Changes in this version + func SplitReservedKeys(v Value) (Value, Value, Value) type Draft + Analysis Value + Meta Value type Event + Analysis Value + Meta Value + func (e *Event) WithAnalysis(analysis Value) *Event + func (e *Event) WithMeta(meta Value) *Event type Value + func MergeReservedKeys(business, meta, analysis Value) Value v0.7.2 Sep 9, 2026 v0.7.1 Sep 7, 2026 v0.7.0 Sep 7, 2026 v0.6.0 Sep 7, 2026 v0.0.1 Sep 7, 2026 Changes in this version + var ErrMissingEventID = errors.New("missing event ID") + var ErrMissingEventType = errors.New("missing event type") + var ErrMissingTimestamp = errors.New("missing timestamp") + func Done(inputID string) *pb.DecodeResponseV2 + type Aggregator interface + Add func(event TimestampedEvent, ctx map[string]any) error + FinalFlush func() []Metric + Flush func() []Metric + Window func() time.Duration + type Draft struct + CausationInputID string + CorrelationKey string + SchemaRef string + Type EventType + Value Value + func (d Draft) ToResponse(inputID string) (*pb.DecodeResponseV2, error) + func (d Draft) Validate() error + type Event struct + Context EventContext + Identity Identity + Payload Payload + Trace TraceContext + func NewEvent(sessionID string, eventType EventType, schemaID string, source SourceID, ...) *Event + func NewEventWithTime(sessionID string, eventType EventType, schemaID string, source SourceID, ...) *Event + func NewEventWithTrace(sessionID string, eventType EventType, schemaID string, source SourceID, ...) *Event + func (e *Event) ExtractStateChanges() []StateChange + func (e *Event) Get(key string) (Value, bool) + func (e *Event) GetID() EventID + func (e *Event) GetSessionID() string + func (e *Event) GetTimestamp() time.Time + func (e *Event) GetType() EventType + func (e *Event) MetaValue(key string) (Value, bool) + func (e *Event) Validate() error + func (e *Event) WithCausation(causationID EventID) *Event + func (e *Event) WithCorrelation(correlationID string) *Event + func (e *Event) WithOrigin(originID EventID) *Event + func (e *Event) WithTrace(trace TraceContext) *Event + type EventContext struct + Direction string + FlowID string + MessageOrdinal int + RawPacketID string + func UnmarshalContextMsgpack(data []byte) (EventContext, error) + func (c EventContext) MarshalMsgpack() ([]byte, error) + type EventID string + func MustNewEventID() EventID + func NewEventID() EventID + func (id EventID) IsZero() bool + func (id EventID) String() string + type EventType string + func (t EventType) String() string + type Identity struct + ID EventID + SchemaID string + SessionID string + Source SourceID + Timestamp time.Time + Type EventType + func NewIdentity(sessionID string, eventType EventType, schemaID string, source SourceID) Identity + func NewIdentityWithTime(sessionID string, eventType EventType, schemaID string, source SourceID, ...) Identity + func (i Identity) IsZero() bool + func (i Identity) Validate() error + type LinkType int + const LinkTypeEthernet + const LinkTypeIEEE80211 + const LinkTypeIPv4 + const LinkTypeIPv6 + const LinkTypeLinuxSLL + const LinkTypeLoop + const LinkTypeNull + const LinkTypeProxyPayload + const LinkTypeRaw + const LinkTypeRawIP + const LinkTypeTLSPlaintext + func LinkTypeFromLayers(l layers.LinkType) LinkType + type Metric struct + Group map[string]string + Name string + Value float64 + Window time.Time + type Packet struct + Dst netip.AddrPort + ID string + LinkType LinkType + Metadata map[string]any + Protocol string + Raw []byte + Src netip.AddrPort + TCPFlags TCPFlags + Timestamp time.Time + type Payload struct + SchemaID string + Value Value + func NewPayload(schemaID string, value Value) Payload + func UnmarshalPayloadMsgpack(data []byte, schemaID string) (Payload, error) + func (p Payload) Get(key string) (Value, bool) + func (p Payload) IsZero() bool + func (p Payload) MarshalMsgpack() ([]byte, error) + func (p Payload) ToJSON() ([]byte, error) + func (p Payload) ToJSONIndent() ([]byte, error) + type SourceID string + func (s SourceID) String() string + type StateChange struct + After Value + Before Value + Metadata Value + Op string + Path string + SubjectID string + SubjectType string + Version int64 + func ExtractStateChanges(v Value) []StateChange + func (sc StateChange) Validate() error + type TCPFlags struct + ACK bool + FIN bool + PSH bool + RST bool + SYN bool + URG bool + func (f TCPFlags) HasCloseFlags() bool + func (f TCPFlags) String() string + type TimestampedEvent interface + GetTimestamp func() time.Time + type TraceContext struct + CausationID EventID + CorrelationID string + OriginID EventID + func NewTraceContext(causationID EventID, correlationID string, originID EventID) TraceContext + func (t TraceContext) HasCausation() bool + func (t TraceContext) HasCorrelation() bool + func (t TraceContext) HasOrigin() bool + func (t TraceContext) IsZero() bool + func (t TraceContext) WithCausation(causationID EventID) TraceContext + func (t TraceContext) WithCorrelation(correlationID string) TraceContext + func (t TraceContext) WithOrigin(originID EventID) TraceContext + type Value struct + Array []Value + Bool bool + Bytes []byte + Float float64 + Int int64 + Kind ValueKind + Object map[string]Value + Str string + Uint uint64 + func UnmarshalValueMsgpack(data []byte) (Value, error) + func ValueArray(a []Value) Value + func ValueBool(b bool) Value + func ValueBytes(b []byte) Value + func ValueFloat(f float64) Value + func ValueFromAny(v any) Value + func ValueFromJSON(data []byte) (Value, error) + func ValueFromJSONMap(data []byte) (Value, error) + func ValueFromMap(m map[string]any) Value + func ValueFromSlice(s []any) Value + func ValueInt(i int64) Value + func ValueNull() Value + func ValueObject(m map[string]Value) Value + func ValueString(s string) Value + func ValueUint(u uint64) Value + func (v *Value) UnmarshalJSON(data []byte) error + func (v Value) Append(item Value) (Value, error) + func (v Value) AsArray() ([]Value, bool) + func (v Value) AsBool() (bool, bool) + func (v Value) AsBytes() ([]byte, bool) + func (v Value) AsFloat() (float64, bool) + func (v Value) AsInt() (int64, bool) + func (v Value) AsObject() (map[string]Value, bool) + func (v Value) AsString() (string, bool) + func (v Value) AsUint() (uint64, bool) + func (v Value) Delete(key string) (Value, error) + func (v Value) Equal(other Value) bool + func (v Value) Get(key string) (Value, bool) + func (v Value) GetByPath(path string) (Value, bool) + func (v Value) Index(i int) (Value, bool) + func (v Value) IsNull() bool + func (v Value) Len() int + func (v Value) MarshalJSON() ([]byte, error) + func (v Value) MarshalMsgpack() ([]byte, error) + func (v Value) Merge(other Value) (Value, error) + func (v Value) Set(key string, val Value) (Value, error) + func (v Value) String() string + func (v Value) ToAny() any + func (v Value) ToJSON() ([]byte, error) + func (v Value) ToJSONIndent() ([]byte, error) + type ValueKind int + const Array + const Bool + const Bytes + const Float + const Int + const Null + const Object + const String + const Uint + func (k ValueKind) String() string