biz

package
v0.0.0-...-c9f961e Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2022 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ProviderSet = wire.NewSet(NewCanal)

ProviderSet is service providers.

Functions

This section is empty.

Types

type Canal

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

Canal is canal.

func NewCanal

func NewCanal(config *conf.Canal, ev *conf.CanalEv, logger zapcore.Core) (c *Canal, cf func(), err error)

NewCanal load config and start canal instance.

func (*Canal) CheckMaster

func (c *Canal) CheckMaster(addr, user, pwd string) (name string, pos int64, err error)

CheckMaster check master status.

func (*Canal) Close

func (c *Canal) Close()

Close close canal instance

func (*Canal) Error

func (c *Canal) Error() string

Error returns canal error.

func (*Canal) Errors

func (c *Canal) Errors() (ies map[string]string)

Errors returns instance errors.

func (*Canal) PosSync

func (c *Canal) PosSync(addr string) (err error)

PosSync sync newewst bin_pos.

type Instance

type Instance struct {
	*canal.Canal
	// contains filtered or unexported fields
}

Instance canal instance

func NewInstance

func NewInstance(c *conf.Canal_Ins, logger zapcore.Core) (ins *Instance, err error)

NewInstance new canal instance

func (*Instance) Check

func (ins *Instance) Check(ev *canal.RowsEvent) (ts []*Target)

Check filter row event

func (*Instance) Close

func (ins *Instance) Close()

Close close instance

func (*Instance) Error

func (ins *Instance) Error() string

Error returns instance error.

func (*Instance) OnDDL

func (ins *Instance) OnDDL(pos mysql.Position, qe *replication.QueryEvent) error

OnDDL OnDDL

func (*Instance) OnGTID

func (ins *Instance) OnGTID(set mysql.GTIDSet) error

OnGTID OnGTID

func (*Instance) OnPosSynced

func (ins *Instance) OnPosSynced(pos mysql.Position, set mysql.GTIDSet, force bool) error

OnPosSynced OnPosSynced

func (*Instance) OnRotate

func (ins *Instance) OnRotate(re *replication.RotateEvent) error

OnRotate OnRotate

func (*Instance) OnRow

func (ins *Instance) OnRow(ev *canal.RowsEvent) error

OnRow send the envent to table

func (*Instance) OnTableChanged

func (ins *Instance) OnTableChanged(schema string, table string) error

func (*Instance) OnXID

func (ins *Instance) OnXID(pos mysql.Position) error

OnXID OnXID

func (*Instance) Start

func (ins *Instance) Start()

Start start binlog receive

func (*Instance) String

func (ins *Instance) String() string

type Target

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

Target databus target

func NewTarget

func NewTarget(db *conf.Canal_Database, logger zapcore.Core) (t *Target)

NewTarget new databus target

Jump to

Keyboard shortcuts

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