Documentation
¶
Overview ¶
Package slow implements a MySQL slow log parser.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SlowLogParser ¶
type SlowLogParser struct {
// contains filtered or unexported fields
}
A SlowLogParser parses a MySQL slow log. It implements the LogParser interface.
func NewSlowLogParser ¶
func NewSlowLogParser(file *os.File, opt log.Options) *SlowLogParser
NewSlowLogParser returns a new SlowLogParser that reads from the open file.
func (*SlowLogParser) EventChan ¶
func (p *SlowLogParser) EventChan() <-chan *log.Event
EventChan returns the unbuffered event channel on which the caller can receive events.
func (*SlowLogParser) Start ¶
func (p *SlowLogParser) Start() error
Start starts the parser. Events are sent to the unbuffered event channel. Parsing stops on EOF, error, or call to Stop. The event channel is closed when parsing stops. The file is not closed.
func (*SlowLogParser) Stop ¶
func (p *SlowLogParser) Stop()
Stop stops the parser before parsing the next event or while blocked on sending the current event to the event channel.
Click to show internal directories.
Click to hide internal directories.