aggregator

package
v0.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPipeline

func NewPipeline(processors []config.Processor, parserFactory ParserFactory) pipeline

Types

type Aggregator

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

func NewAggregator

func NewAggregator(pipeline LineParser, logRepository LogRepository) Aggregator

func (*Aggregator) Aggregate

func (*Aggregator) AggregateFile

func (a *Aggregator) AggregateFile(path string) error

type Filter

type Filter struct {
	StringTokens []string
	DataTokens   map[string]string
}

func (Filter) Matches

func (filter Filter) Matches(log Log) bool

type Input

type Input struct {
	Value string
}

type Level

type Level int
const (
	LevelNone Level = iota
	LevelDebug
	LevelInfo
	LevelWarn
	LevelError
)

type LineParser

type LineParser interface {
	Parse(line string) (*Log, error)
}

type Log

type Log struct {
	Id   string
	Data map[string]string
	Raw  string
}

type LogRepository

type LogRepository interface {
	Add(log Log) error
	Get(filter Filter) ([]Log, error)
	GetById(id string) (*Log, error)
}

type Notification

type Notification struct {
	NewEntry *Log
	BaseList []Log
}

type ParserFactory

type ParserFactory interface {
	GetParser(parser config.Parser) LineParser
}

Jump to

Keyboard shortcuts

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