Documentation
¶
Overview ¶
Package reader is responsible for reading log line from different data sources
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ConsoleReaderPrompt is the prompt for console reader //nolint:gochecknoglobals ConsoleReaderPrompt = " logtrics \033[31m>\033[0m " //ConsoleReaderHistory is the history file for console input lines //nolint:gochecknoglobals ConsoleReaderHistory = "/tmp/readline.tmp" // ConsoleReaderHelp is the help text to print on console reader startup //nolint:gochecknoglobals ConsoleReaderHelp = `` /* 214-byte string literal not displayed */ )
Functions ¶
This section is empty.
Types ¶
type LogReader ¶
type LogReader interface {
Start(ctx context.Context, cb ReadCallBack) error
}
LogReader is the interface to read logs
func NewConsole ¶
func NewConsole(conf *config.Configuration) (LogReader, error)
NewConsole returns a new Console runner instance
func NewTCP ¶
func NewTCP(conf *config.Configuration) LogReader
NewUDP returns a new reader which reads the logs from the UDP socket
func NewUDP ¶
func NewUDP(conf *config.Configuration) LogReader
NewUDP returns a new reader which reads the logs from the UDP socket
type ReadCallBack ¶
type ReadCallBack = func(event LogEvent)
ReadCallBack is the callback function for log events
Click to show internal directories.
Click to hide internal directories.