Documentation ¶
Index ¶
- Constants
- type Column
- type Config
- type Operation
- type OperationHeader
- type OperationType
- type Progress
- type Row
- type StdoutSink
- func (o *StdoutSink) Checkpoint() *ckp.Checkpoint
- func (o *StdoutSink) Close() error
- func (o *StdoutSink) Err() <-chan error
- func (o *StdoutSink) Initialize(ctx context.Context, ckp *ckp.Checkpoint) error
- func (o *StdoutSink) OnBegin(h *replication.EventHeader) error
- func (o *StdoutSink) OnCommit(h *replication.EventHeader, progress prog.Progress) error
- func (o *StdoutSink) OnDDL(h *replication.EventHeader, e *replication.QueryEvent, p prog.Progress) error
- func (o *StdoutSink) OnGTID(h *replication.EventHeader, e *canal.GtidEvent) error
- func (o *StdoutSink) OnQuery(h *replication.EventHeader, e *replication.QueryEvent) error
- func (o *StdoutSink) OnRotate(h *replication.EventHeader, e *replication.RotateEvent) error
- func (o *StdoutSink) OnRow(h *replication.EventHeader, e *canal.RowsEvent) error
- func (o *StdoutSink) String() string
- type Table
Constants ¶
View Source
const ( OpType_Rotate OperationType = "rotate" OpType_Gtid = "gtid" OpType_Begin = "begin" OpType_Commit = "commit" OpType_Insert = "insert" OpType_Update = "update" OpType_Delete = "delete" OpType_Query = "query" OpType_DDL = "ddl" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Operation ¶
type Operation struct { Header *OperationHeader `json:"header"` // NextLogName and NextLogPos field is for Rotate operation NextLogName string `json:"next_log_name,omitempty"` NextLogPos uint32 `json:"next_log_pos,omitempty"` // Gtid field is for GTID operation Gtid string `json:"gtid,omitempty"` // Database and Statement filed is for QUERY/DDL operation Database string `json:"database,omitempty"` Statement string `json:"statement,omitempty"` // Table and Rows field is for INSERT/UPDATE/DELETE operation Table *Table `json:"table,omitempty"` Rows []*Row `json:"rows,omitempty"` // Progress field is for COMMIT/DDL operation, // represents the GTID_SET or file&pos Progress *Progress `json:"progress,omitempty"` // contains filtered or unexported fields }
type OperationHeader ¶
type OperationHeader struct { ServerID uint32 `json:"server_id"` Type OperationType `json:"type"` Timestamp uint32 `json:"timestamp"` LogPos uint32 `json:"log_pos"` }
type OperationType ¶
type OperationType string
type Row ¶
type Row struct { Before []interface{} `json:"before,omitempty"` After []interface{} `json:"after,omitempty"` }
type StdoutSink ¶
func (*StdoutSink) Checkpoint ¶
func (o *StdoutSink) Checkpoint() *ckp.Checkpoint
func (*StdoutSink) Close ¶
func (o *StdoutSink) Close() error
func (*StdoutSink) Err ¶
func (o *StdoutSink) Err() <-chan error
func (*StdoutSink) Initialize ¶
func (o *StdoutSink) Initialize(ctx context.Context, ckp *ckp.Checkpoint) error
func (*StdoutSink) OnBegin ¶
func (o *StdoutSink) OnBegin(h *replication.EventHeader) error
func (*StdoutSink) OnCommit ¶
func (o *StdoutSink) OnCommit(h *replication.EventHeader, progress prog.Progress) error
func (*StdoutSink) OnDDL ¶
func (o *StdoutSink) OnDDL(h *replication.EventHeader, e *replication.QueryEvent, p prog.Progress) error
func (*StdoutSink) OnGTID ¶
func (o *StdoutSink) OnGTID(h *replication.EventHeader, e *canal.GtidEvent) error
func (*StdoutSink) OnQuery ¶
func (o *StdoutSink) OnQuery(h *replication.EventHeader, e *replication.QueryEvent) error
func (*StdoutSink) OnRotate ¶
func (o *StdoutSink) OnRotate(h *replication.EventHeader, e *replication.RotateEvent) error
func (*StdoutSink) OnRow ¶
func (o *StdoutSink) OnRow(h *replication.EventHeader, e *canal.RowsEvent) error
func (*StdoutSink) String ¶
func (o *StdoutSink) String() string
Click to show internal directories.
Click to hide internal directories.