Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Filter ¶
Filter is an interface that performs filtering tasks during log scraping. It allows to ignore log values based on implementation logic.
type FilterFunc ¶
The FilterFunc type is an adapter to allow the use of ordinary functions as scraping filters. If f is a function with the appropriate signature, FilterFunc(f) is a Filter that calls f.
type LogFmt ¶
type LogFmt struct {
KeyFilter Filter
}
LogFmt is a scraper for logs in logfmt format.
See: https://brandur.org/logfmt
func (*LogFmt) StartScraping ¶
func (logFmt *LogFmt) StartScraping(reader io.Reader) <-chan servicelog.Entry
StartScraping starts scraping logs in logfmt format from given reader and sends parsed entries to the returned unbuffered channel. Logs are scraped as long as the passed reader does not return an io.EOF error.
type Scraper ¶
type Scraper interface {
StartScraping(io.Reader) <-chan servicelog.Entry
}
Scraper in an interface for various scrapers that support different log formats.
type ValueFilter ¶
type ValueFilter struct {
Values [][]byte
}
ValueFilter allows to ignore specific values during log scraping.
func (ValueFilter) Match ¶
func (f ValueFilter) Match(v []byte) bool
Match returns true if passed value is on the filtered list - false otherwise.