processors

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FieldTimestamp  = "timestamp"
	FieldMessage    = "message"
	FieldLevel      = "level"
	FieldCaller     = "caller"
	FieldStacktrace = "stacktrace"

	// FieldTimestampNanos carries the full-precision timestamp: bleve
	// truncates stored datetime values to seconds.
	FieldTimestampNanos = "timestamp_ns"
)

Variables

This section is empty.

Functions

func BuildDoc

func BuildDoc(entry *domain.Entry) (string, map[string]interface{}, error)

BuildDoc converts a raw entry into the document shape the Indexer stores, returning the generated entry ID. Shared with entryreader.Matcher so the --filter option and the web search agree on semantics by construction.

func NewIndexMapping

func NewIndexMapping() mapping.IndexMapping

NewIndexMapping builds the bleve mapping for log entries: timestamp as a real datetime (for range windows and sorting) and level as a keyword (for exact matches); everything else is mapped dynamically.

Types

type EntryMatcher

type EntryMatcher interface {
	Match(ctx context.Context, entry *domain.Entry) (bool, error)
}

EntryMatcher reports whether an entry matches a filter expression.

type Filter

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

Filter skips entries rejected by the matcher.

func NewFilter

func NewFilter(matcher EntryMatcher) *Filter

func (*Filter) Process

func (f *Filter) Process(ctx context.Context, entry *domain.Entry) error

type Indexer

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

Indexer indexes log entries into a bleve index.

func NewIndexer

func NewIndexer(index bleve.Index) *Indexer

func (*Indexer) Process

func (s *Indexer) Process(_ context.Context, entry *domain.Entry) error

type Stdout

type Stdout struct {
}

func NewStdout

func NewStdout() *Stdout

func (*Stdout) Process

func (s *Stdout) Process(_ context.Context, entry *domain.Entry) error

Jump to

Keyboard shortcuts

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