Documentation ¶
Index ¶
- type MySQLBinlogHandler
- func (h *MySQLBinlogHandler) OnDDL(nextPos mysql.Position, queryEvent *replication.QueryEvent) error
- func (h *MySQLBinlogHandler) OnRotate(e *replication.RotateEvent) error
- func (h *MySQLBinlogHandler) OnRow(e *canal.RowsEvent) error
- func (h *MySQLBinlogHandler) OnTableChanged(schema string, table string) error
- func (h *MySQLBinlogHandler) String() string
- type MySQLConsumer
- type MySQLSinker
- type MySQLSinkerConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MySQLBinlogHandler ¶
func (*MySQLBinlogHandler) OnDDL ¶
func (h *MySQLBinlogHandler) OnDDL(nextPos mysql.Position, queryEvent *replication.QueryEvent) error
func (*MySQLBinlogHandler) OnRotate ¶
func (h *MySQLBinlogHandler) OnRotate(e *replication.RotateEvent) error
func (*MySQLBinlogHandler) OnRow ¶
func (h *MySQLBinlogHandler) OnRow(e *canal.RowsEvent) error
OnRow 对于 DUMP, 此处的区别是 Header是否为空, 可以判断如果header为空用 insert ignore into, 否则用replace into
func (*MySQLBinlogHandler) OnTableChanged ¶
func (h *MySQLBinlogHandler) OnTableChanged(schema string, table string) error
func (*MySQLBinlogHandler) String ¶
func (h *MySQLBinlogHandler) String() string
type MySQLConsumer ¶
MySQLConsumer 目前需要自己手动建表, 意味着 Mapping 不能为空
func (*MySQLConsumer) Name ¶
func (c *MySQLConsumer) Name() string
type MySQLSinker ¶
type MySQLSinker struct { ErrorContinue bool `json:"errorContinue"` Filters []filter.MySQLFilter `json:"filters"` Consumers []*MySQLConsumer `json:"consumers"` // contains filtered or unexported fields }
func Build ¶
func Build(c string) *MySQLSinker
func (*MySQLSinker) ContinueOnError ¶
func (s *MySQLSinker) ContinueOnError() bool
func (*MySQLSinker) Disable ¶
func (s *MySQLSinker) Disable()
func (*MySQLSinker) Enable ¶
func (s *MySQLSinker) Enable() bool
type MySQLSinkerConfig ¶
type MySQLSinkerConfig struct { DestDatasource common.MySQLInstance `json:"destDatasource"` Filters []filter.MySQLFilter `json:"filters"` Mappings []mapper.TableMapping `json:"mappings"` ErrorContinue bool `json:"errorContinue"` }
MySQLSinkerConfig binlog 消费者配置, 一个生产者,可以对应多个消费者
Click to show internal directories.
Click to hide internal directories.