Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Result ¶
type Result struct { Ignore bool // whether the event should be ignored IgnoreReason string // why the transformer ignore the event LogPos uint32 // binlog event's End_log_pos or Position in RotateEvent NextLogName string // next binlog filename, only valid for RotateEvent GTIDSet mysql.GTIDSet // GTIDSet got from QueryEvent and XIDEvent when RawModeEnabled not true CanSaveGTID bool // whether can save GTID into meta, true for DDL query and XIDEvent }
Result represents a transform result.
type Transformer ¶
type Transformer interface { // Transform transforms a binlog event. Transform(e *replication.BinlogEvent) Result }
Transformer receives binlog events from a reader and transforms them. The transformed binlog events should be send to one or more writers. The transformer should support:
- extract binlog position, GTID info from the event.
- decide the event whether needed by a downstream writer. - the downstream writer may also drop some events according to its strategy.
NOTE: more features maybe moved from outer into Transformer later.
func NewTransformer ¶
func NewTransformer(parser2 *parser.Parser) Transformer
NewTransformer creates a Transformer instance.
Click to show internal directories.
Click to hide internal directories.