Documentation ¶
Index ¶
- type Binlog
- func (h *Binlog) Close()
- func (h *Binlog) OnDDL(p mysql.Position, e *replication.QueryEvent) error
- func (h *Binlog) OnGTID(g mysql.GTIDSet) error
- func (h *Binlog) OnLeader(isLeader bool)
- func (h *Binlog) OnPosSynced(p mysql.Position, b bool) error
- func (h *Binlog) OnRotate(e *replication.RotateEvent) error
- func (h *Binlog) OnRow(e *canal.RowsEvent) error
- func (h *Binlog) OnTableChanged(schema string, table string) error
- func (h *Binlog) OnXID(p mysql.Position) error
- func (h *Binlog) RegisterService(s service.Service)
- func (h *Binlog) SaveBinlogPosition(r []byte)
- func (h *Binlog) Start()
- func (h *Binlog) StartService()
- func (h *Binlog) StopService(exit bool)
- func (h *Binlog) String() string
- type BinlogOption
- type OnEventFunc
- type PosChangeFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Binlog ¶
type Binlog struct { // github.com/siddontang/go-mysql interface canal.DummyEventHandler // config Config *app.MysqlConfig // event unique index EventIndex int64 // contains filtered or unexported fields }
func (*Binlog) OnDDL ¶
func (h *Binlog) OnDDL(p mysql.Position, e *replication.QueryEvent) error
暂未使用的基础事件
func (*Binlog) OnTableChanged ¶
alter table结构改变事件回调
func (*Binlog) SaveBinlogPosition ¶
use for agent sync pos callback 保存pos信息到cache 这里的api对外提供,用于agent集群同步pos信息
func (*Binlog) StopService ¶
停止服务 参数exit为true时,会彻底退出服务 这里只是发出了停止服务信号
type BinlogOption ¶
type BinlogOption func(h *Binlog)
func PosChange ¶
func PosChange(f PosChangeFunc) BinlogOption
set pos change callback if pos change, will call h.onPosChanges func 设置binlog pos改变回调api
type OnEventFunc ¶
type PosChangeFunc ¶
type PosChangeFunc func(r []byte)
Click to show internal directories.
Click to hide internal directories.