store

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2022 License: MIT Imports: 15 Imported by: 0

Documentation

Index

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.

Jump to

Keyboard shortcuts

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