2016-03-22 14:12:51 +00:00
|
|
|
/*
|
2016-03-24 14:11:56 +00:00
|
|
|
Copyright 2016 GitHub Inc.
|
2016-05-16 09:09:17 +00:00
|
|
|
See https://github.com/github/gh-ost/blob/master/LICENSE
|
2016-03-22 14:12:51 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
package binlog
|
|
|
|
|
2016-05-19 13:11:36 +00:00
|
|
|
import (
|
|
|
|
"github.com/github/gh-ost/go/mysql"
|
|
|
|
)
|
|
|
|
|
2016-03-24 14:11:56 +00:00
|
|
|
// BinlogReader is a general interface whose implementations can choose their methods of reading
|
|
|
|
// a binary log file and parsing it into binlog entries
|
2016-03-22 14:12:51 +00:00
|
|
|
type BinlogReader interface {
|
2016-04-07 13:57:12 +00:00
|
|
|
StreamEvents(canStopStreaming func() bool, entriesChannel chan<- *BinlogEntry) error
|
2016-05-19 13:11:36 +00:00
|
|
|
GetCurrentBinlogCoordinates() *mysql.BinlogCoordinates
|
|
|
|
Reconnect() error
|
2016-03-22 14:12:51 +00:00
|
|
|
}
|