Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FormattedPrinter ¶
type FormattedPrinter struct {
// contains filtered or unexported fields
}
FormattedPrinter is a printer that knows how to parse the Kafkacat's format spec.
func NewFormatterPrinter ¶
func NewFormatterPrinter(format string, out, errOut io.Writer) *FormattedPrinter
NewFormatterPrinter returns a new instance of a printer that supports formatting similar to kafkacat's. Format tokens:
%s Message payload %k Message key %t Topic %p Partition %o Offset %T Timestamp in milliseconds %Tf Timestamp formatted as RFC3339 \n \r Newlines \t Tab
func (*FormattedPrinter) Print ¶
func (f *FormattedPrinter) Print(msg Msg)
Print applies a specific format to a consumed Kafka message.
func (*FormattedPrinter) PrintErr ¶
func (f *FormattedPrinter) PrintErr(err error)
PrintErr knows how to print an error.
Click to show internal directories.
Click to hide internal directories.