Documentation ¶
Index ¶
- Constants
- Variables
- func Filter(filter *vm.Program, pattern allot.Command, ...) (totalLines, matchingLines, nonPatternLines int, logs string, err error)
- func IsLineMatching(line string, filter *vm.Program, pattern allot.Command) (filterMatched bool, patternMatched bool, err error)
- func StartBuffering(inputReader io.Reader, app *tview.Application, stateStore *gredux.Store, ...)
Constants ¶
View Source
const PATTERN_MATCHING_PARAMETER_NAME = "patternMatches"
Variables ¶
View Source
var Types = map[string]string{
"string": "[^\\s]+",
"integer": "[0-9]+",
"rest": ".*",
}
Types are pattern's types usable in declaring parameter's type and its regex shape TODO: Allow custom types in config
Functions ¶
func Filter ¶
func Filter(filter *vm.Program, pattern allot.Command, nonPatternMatchingDecorator func(string) string) (totalLines, matchingLines, nonPatternLines int, logs string, err error)
Filter goes through buffer and writes out logs that match It assumes that display was cleared out
func IsLineMatching ¶ added in v0.2.0
func IsLineMatching(line string, filter *vm.Program, pattern allot.Command) (filterMatched bool, patternMatched bool, err error)
IsLineMatching check if for given filter and pattern the line matches. It returns enum values FILTER_MATCH, PARSE_PATTERN_NO_MATCH or FILTER_NO_MATCH according it matching result
func StartBuffering ¶
func StartBuffering(inputReader io.Reader, app *tview.Application, stateStore *gredux.Store, maxBufferSize int)
StartBuffering takes io.Reader, reads its content and stores it to internal buffer It allows only `maxBufferSize` elements in the buffer. It drops the logs in FIFO manner.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.