mysql

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2024 License: AGPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PluginName            = "mysql"
	DefaultCharset string = "utf8"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BinlogTailer

type BinlogTailer struct {
	*config.MysqlConfig

	Pos  mysql.Position
	GSet mysql.GTIDSet
	// contains filtered or unexported fields
}

func (*BinlogTailer) Close

func (b *BinlogTailer) Close()

func (*BinlogTailer) New

func (b *BinlogTailer) New(inputPlugin *InputPlugin)

func (*BinlogTailer) Start

func (b *BinlogTailer) Start(gtid string)

type InputPlugin

type InputPlugin struct {
	*config.MysqlConfig
	// contains filtered or unexported fields
}

func (*InputPlugin) Close

func (i *InputPlugin) Close()

func (*InputPlugin) Configure

func (i *InputPlugin) Configure(conf map[string]interface{}) error

func (*InputPlugin) NewDeleteMsgs

func (i *InputPlugin) NewDeleteMsgs(schemaName string, tableName string, tableMeta *metas.Table, evs *replication.RowsEvent, header *replication.EventHeader) (msgs []*core.Msg, err error)

func (*InputPlugin) NewInput

func (i *InputPlugin) NewInput(metas *core.Metas)

func (*InputPlugin) NewInsertMsgs

func (i *InputPlugin) NewInsertMsgs(schemaName string, tableName string, tableMeta *metas.Table, evs *replication.RowsEvent, header *replication.EventHeader) (msgs []*core.Msg, err error)

func (*InputPlugin) NewUpdateMsgs

func (i *InputPlugin) NewUpdateMsgs(schemaName string, tableName string, tableMeta *metas.Table, evs *replication.RowsEvent, header *replication.EventHeader) (msgs []*core.Msg, err error)

func (*InputPlugin) NewXIDMsg

func (i *InputPlugin) NewXIDMsg(ev *replication.XIDEvent, header *replication.EventHeader) (msg *core.Msg, err error)

func (*InputPlugin) SendMsg

func (i *InputPlugin) SendMsg(msg *core.Msg)

func (*InputPlugin) SendMsgs

func (i *InputPlugin) SendMsgs(msgs []*core.Msg)

func (*InputPlugin) Start

func (i *InputPlugin) Start(pos core.Position, in chan *core.Msg)

type MetaPlugin

type MetaPlugin struct {
	*config.MysqlConfig
	// contains filtered or unexported fields
}

func (*MetaPlugin) Add

func (m *MetaPlugin) Add(newTable *metas.Table) error

func (*MetaPlugin) Close

func (m *MetaPlugin) Close()

func (*MetaPlugin) Configure

func (m *MetaPlugin) Configure(conf map[string]interface{}) error

func (*MetaPlugin) Delete

func (m *MetaPlugin) Delete(schema string, name string) error

func (*MetaPlugin) Get

func (m *MetaPlugin) Get(schema string, tableName string) (table *metas.Table, err error)

func (*MetaPlugin) GetAll

func (m *MetaPlugin) GetAll() map[string]*metas.Table

func (*MetaPlugin) GetMeta added in v0.3.0

func (m *MetaPlugin) GetMeta(router *metas.Router) (table *metas.Table, err error)

func (*MetaPlugin) GetVersion added in v0.0.2

func (m *MetaPlugin) GetVersion(schema string, tableName string, version uint) (table *metas.Table, err error)

func (*MetaPlugin) GetVersions added in v0.0.2

func (m *MetaPlugin) GetVersions(schema string, tableName string) []*metas.Table

func (*MetaPlugin) LoadMeta

func (m *MetaPlugin) LoadMeta(routers []*metas.Router) (err error)

func (*MetaPlugin) Save

func (m *MetaPlugin) Save() error

func (*MetaPlugin) Update

func (m *MetaPlugin) Update(newTable *metas.Table) error

type PositionPlugin

type PositionPlugin struct {
	*config.MysqlConfig
	// contains filtered or unexported fields
}

func (*PositionPlugin) Close

func (p *PositionPlugin) Close()

func (*PositionPlugin) Configure

func (p *PositionPlugin) Configure(conf map[string]interface{}) error

func (*PositionPlugin) Get

func (p *PositionPlugin) Get() string

func (*PositionPlugin) LoadPosition

func (p *PositionPlugin) LoadPosition(name string) string

func (*PositionPlugin) Save

func (p *PositionPlugin) Save() error

func (*PositionPlugin) Start

func (p *PositionPlugin) Start()

func (*PositionPlugin) Update

func (p *PositionPlugin) Update(v string) error

Jump to

Keyboard shortcuts

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