slow

package
v0.0.0-...-73d29c6 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2021 License: BSD-3-Clause Imports: 10 Imported by: 8

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.

Jump to

Keyboard shortcuts

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