Documentation ¶
Index ¶
- func NewLineEndSplitFunc(re *regexp.Regexp, flushAtEOF bool, trimFunc trimFunc) bufio.SplitFunc
- func NewLineStartSplitFunc(re *regexp.Regexp, flushAtEOF bool, trimFunc trimFunc) bufio.SplitFunc
- func NewNewlineSplitFunc(enc encoding.Encoding, flushAtEOF bool, trimFunc trimFunc) (bufio.SplitFunc, error)
- func SplitNone(maxLogSize int) bufio.SplitFunc
- type Flusher
- type FlusherConfig
- type Multiline
- type MultilineConfig
- type Splitter
- type SplitterConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewLineEndSplitFunc ¶
NewLineEndSplitFunc creates a bufio.SplitFunc that splits an incoming stream into tokens that end with a match to the regex pattern provided
func NewLineStartSplitFunc ¶
NewLineStartSplitFunc creates a bufio.SplitFunc that splits an incoming stream into tokens that start with a match to the regex pattern provided
Types ¶
type Flusher ¶
type Flusher struct {
// contains filtered or unexported fields
}
Flusher keeps information about flush state
func (*Flusher) ShouldFlush ¶
ShouldFlush returns true if data should be forcefully flushed
func (*Flusher) UpdateDataChangeTime ¶
type FlusherConfig ¶
FlusherConfig is a configuration of Flusher helper
func NewFlusherConfig ¶
func NewFlusherConfig() FlusherConfig
NewFlusherConfig creates a default Flusher config
func (*FlusherConfig) Build ¶
func (c *FlusherConfig) Build() *Flusher
Build creates Flusher from configuration
type MultilineConfig ¶
type MultilineConfig struct { LineStartPattern string `mapstructure:"line_start_pattern"` LineEndPattern string `mapstructure:"line_end_pattern"` }
MultilineConfig is the configuration of a multiline helper
func NewMultilineConfig ¶
func NewMultilineConfig() MultilineConfig
NewMultilineConfig creates a new Multiline config
type SplitterConfig ¶
type SplitterConfig struct { Encoding string `mapstructure:"encoding,omitempty"` Flusher FlusherConfig `mapstructure:",squash,omitempty"` Multiline MultilineConfig `mapstructure:"multiline,omitempty"` PreserveLeadingWhitespaces bool `mapstructure:"preserve_leading_whitespaces,omitempty"` PreserveTrailingWhitespaces bool `mapstructure:"preserve_trailing_whitespaces,omitempty"` }
SplitterConfig consolidates MultilineConfig and FlusherConfig
func NewSplitterConfig ¶
func NewSplitterConfig() SplitterConfig
NewSplitterConfig returns default SplitterConfig