Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FormatFunc ¶
type FormatFunc func(wr io.Writer, msg *ktail.LogMessage)
FormatFunc func which is passed to the message sorter and invoked for each line to format it
type MessageSorter ¶
type MessageSorter struct {
// contains filtered or unexported fields
}
MessageSorter manages a cache of messages and sorts then formats them on each flush
func New ¶
func New(wr io.Writer, batchSize int, formatFunc FormatFunc) *MessageSorter
New create a new message sorter
func (*MessageSorter) Flush ¶ added in v1.1.6
func (lms *MessageSorter) Flush()
Flush force a flush of messages
func (*MessageSorter) PushBatch ¶
func (lms *MessageSorter) PushBatch(logMessageBatch []*ktail.LogMessage) bool
PushBatch this inserts a batch in the cache and checks whether to flush
Click to show internal directories.
Click to hide internal directories.