Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Plugins map[string]ReaderConstructor
Plugins contains registered snaphot reader plugins
Functions ¶
This section is empty.
Types ¶
type Reader ¶
type Reader interface { //Start connects to the db and starts snapshot for the table Start(cluster string, svc string, dbs string, table string, enc encoder.Encoder) (lastGtid string, err error) //End deinitializes snapshot reader End() //FIXME: FromTx methods used in validation code only, look for a way to //remove it from this generic //StartFromTx starts snapshot from given tx StartFromTx(svc string, dbs string, table string, enc encoder.Encoder, tx *sql.Tx) (lastGtid string, err error) //EndFromTx deinitializes reader started by PrepareFromTx EndFromTx() //GetNext pops record fetched by HasNext //returns: key and encoded message GetNext() (string, []byte, error) //HasNext fetches the record from the source and encodes using encoder provided when reader created //This is a blocking method HasNext() bool }
Reader is our contract for snapshot reader
func InitReader ¶
InitReader constructs encoder without updating schema
type ReaderConstructor ¶
ReaderConstructor initializes logger plugin
Click to show internal directories.
Click to hide internal directories.