Documentation
¶
Index ¶
Constants ¶
View Source
const ( SourceFormatJSON = "json" SourceFormatLogfmt = "logfmt" SourceFormatKeyValue = "key_value" SourceFormatPlainText = "plain_text" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Event ¶
type Event struct {
Timestamp *time.Time `json:"ts,omitempty"`
Text string `json:"text"`
Attrs map[string]string `json:"attrs"`
Inferred *Inferred `json:"inferred"`
}
Event mirrors the canonical v1 schema in proto/lapp/event/v1/event.proto.
type Fixture ¶
type Fixture struct {
Name string `json:"name"`
SourceFormat string `json:"source_format"`
Description string `json:"description"`
Event Event `json:"event"`
}
Fixture mirrors the protobuf fixture contract for JSON-backed examples.
func LoadFixtures ¶
LoadFixtures reads all JSON fixture files from a directory.
type Inferred ¶
type Inferred struct {
Pattern string `json:"pattern,omitempty"`
Entity string `json:"entity,omitempty"`
}
Inferred contains metadata derived after parsing.
type ParsedLine ¶
ParsedLine is the normalized result of parsing a single raw log line.
func ParseLine ¶
func ParseLine(line string) ParsedLine
ParseLine runs the default parser chain and always returns a normalized event.
Click to show internal directories.
Click to hide internal directories.