Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { SyncConfig replication.BinlogSyncerConfig Pos mysql.Position GTIDs gtid.Set EnableGTID bool MasterID string // the identifier for the master, used when logging. }
Config is the configuration used by the Reader.
type Reader ¶
type Reader interface { // Start starts the reading process. Start() error // Close closes the reader and release the resource. Close() error // GetEvent gets the binlog event one by one, it will block if no event can be read. // You can pass a context (like Cancel) to break the block. GetEvent(ctx context.Context) (Result, error) }
Reader reads binlog events from a upstream master server. The read binlog events should be send to a transformer. The reader should support:
- handle expected errors
- do retry if possible
NOTE: some errors still need to be handled in the outer caller.
type Result ¶
type Result struct {
Event *replication.BinlogEvent
}
Result represents a read operation result.
Click to show internal directories.
Click to hide internal directories.