Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Stream ¶
func Stream(ch chan string, options MessagePrinterOptions)
Types ¶
type FilterFn ¶
type FilterFn func( keypart1 string, record map[string]interface{}, options MessagePrinterOptions) bool
FilterFn is a function to filter incoming messages
type MessagePrinter ¶
type MessagePrinter struct {
// contains filtered or unexported fields
}
MessagePrinter handles print representation of messages streamed by logyard.
func NewMessagePrinter ¶
func NewMessagePrinter(options MessagePrinterOptions) MessagePrinter
func (MessagePrinter) AddFormat ¶
func (p MessagePrinter) AddFormat(keypart1 string, format string)
Add print format for messages identified by this key prefix. The prefix of the key must not contain any period. For example, if messages are identified by "systail.dea.NODE", then keypart1 should just be "systail".
func (MessagePrinter) Print ¶
func (p MessagePrinter) Print(msg zmqpubsub.Message) error
Print a message from logyard streams
func (MessagePrinter) PrintInternalError ¶
func (p MessagePrinter) PrintInternalError(errmsg string)
func (*MessagePrinter) SetPrePrintHook ¶
func (p *MessagePrinter) SetPrePrintHook(fn FilterFn)
Click to show internal directories.
Click to hide internal directories.