Documentation
¶
Index ¶
- func LineEndSplitFunc(re *regexp.Regexp, omitPattern, flushAtEOF bool, enc encoding.Encoding, ...) bufio.SplitFunc
- func LineStartSplitFunc(re *regexp.Regexp, omitPattern, flushAtEOF bool, enc encoding.Encoding, ...) bufio.SplitFunc
- func NewlineSplitFunc(enc encoding.Encoding, flushAtEOF bool) (bufio.SplitFunc, error)
- func NoSplitFunc(maxLogSize int) bufio.SplitFunc
- type Config
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LineEndSplitFunc ¶
func LineEndSplitFunc(re *regexp.Regexp, omitPattern, flushAtEOF bool, enc encoding.Encoding, logger *zap.Logger) bufio.SplitFunc
LineEndSplitFunc creates a bufio.SplitFunc that splits an incoming stream into tokens that end with a match to the regex pattern provided
func LineStartSplitFunc ¶
func LineStartSplitFunc(re *regexp.Regexp, omitPattern, flushAtEOF bool, enc encoding.Encoding, logger *zap.Logger) bufio.SplitFunc
LineStartSplitFunc creates a bufio.SplitFunc that splits an incoming stream into tokens that start with a match to the regex pattern provided
func NewlineSplitFunc ¶
NewlineSplitFunc splits log lines by newline, just as bufio.ScanLines, but never returning an token using EOF as a terminator
func NoSplitFunc ¶
NoSplitFunc doesn't split any of the bytes, it reads in all of the bytes and returns it all at once. This is for when the encoding is nop
Types ¶
type Config ¶
type Config struct {
LineStartPattern string `mapstructure:"line_start_pattern"`
LineEndPattern string `mapstructure:"line_end_pattern"`
OmitPattern bool `mapstructure:"omit_pattern"`
}
Config is the configuration for a split func
Click to show internal directories.
Click to hide internal directories.