plugins

package
v0.0.0-...-677aa34 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2020 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrSkip = errors.New("Handler error, but skipped")
)

Functions

This section is empty.

Types

type DefaultDumpHandler

type DefaultDumpHandler struct {
	// contains filtered or unexported fields
}

DefaultDumpHandler default handler

func NewDefaultDumpHandler

func NewDefaultDumpHandler(cfg config.Config) *DefaultDumpHandler

NewDefaultDumpHandler debug plugins

func (*DefaultDumpHandler) BinLog

func (dumpHandler *DefaultDumpHandler) BinLog(name string, pos uint64) error

BinLog BinLog

func (*DefaultDumpHandler) Data

func (dumpHandler *DefaultDumpHandler) Data(schema string, table string, values []string) error

type ParseHandler

type ParseHandler interface {
	// Parse CHANGE MASTER TO MASTER_LOG_FILE=name, MASTER_LOG_POS=pos;
	BinLog(name string, pos uint64) error

	Data(schema string, table string, values []string) error
}

ParseHandler parse dump data handler

type Tables

type Tables struct {
	// contains filtered or unexported fields
}

Tables table 缓存

func NewTables

func NewTables(cfg config.MysqlCfg) *Tables

NewTables new tables

func (*Tables) Execute

func (tables *Tables) Execute(cmd string, args ...interface{}) (rr *mysql.Result, err error)

Execute a SQL,首次创建连接

func (*Tables) GetMasterPos

func (tables *Tables) GetMasterPos() (mysql.Position, error)

GetMasterPos GetMasterPos

func (*Tables) GetTable

func (tables *Tables) GetTable(db string, table string) (*schema.Table, error)

GetTable get table

Jump to

Keyboard shortcuts

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