sorter

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2018 License: MIT Imports: 3 Imported by: 0

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

Jump to

Keyboard shortcuts

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