Documentation
¶
Index ¶
- type Binlog
- func (bin *Binlog) Close()
- func (bin *Binlog) CloseSQLWorker(sqlworker *SQLWorker)
- func (bin *Binlog) Init() error
- func (bin *Binlog) LastGTID() int64
- func (bin *Binlog) LogEvent(typ string, schema string, sql string)
- func (bin *Binlog) NewSQLWorker(ts int64) (*SQLWorker, error)
- func (bin *Binlog) RelayInfos() []RelayInfo
- type Event
- type IOWorker
- type Info
- type RelayInfo
- type SQLWorker
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Binlog ¶
type Binlog struct {
// contains filtered or unexported fields
}
Binlog tuple.
func NewBinlog ¶
func NewBinlog(log *xlog.Log, conf *config.BinlogConfig) *Binlog
NewBinlog creates the new binlog tuple.
func (*Binlog) CloseSQLWorker ¶
CloseSQLWorker used to close the sqlworker.
func (*Binlog) NewSQLWorker ¶
NewSQLWorker creates the new sql worker.
func (*Binlog) RelayInfos ¶
RelayInfos returns all the sqlworker status.
type Event ¶
type Event struct {
// An identifier that describes the event type.
Type string
Schema string
Query string
Version uint16
// The GTID of this event.
Timestamp uint64
// The name of the file that is being listed.
LogName string
// The position at which the event occurs.
Pos int64
// The position at which the next event begins, which is equal to Pos plus the size of the event.
EndLogPos int64
}
Event binlog event.
type IOWorker ¶
type IOWorker struct {
// contains filtered or unexported fields
}
IOWorker tuple.
func NewIOWorker ¶
func NewIOWorker(log *xlog.Log, conf *config.BinlogConfig) *IOWorker
NewIOWorker creates the new IOWorker.
type Info ¶
type Info struct {
// contains filtered or unexported fields
}
Info tuple.
type RelayInfo ¶
type RelayInfo struct {
ID int64
StartGTID int64
RelayGTID int64
LastWriteGTID int64
Relaybin string
RelayPosition int64
SecondBehinds int64
}
RelayInfo represents the relay sqlworker status.
type SQLWorker ¶
type SQLWorker struct {
// contains filtered or unexported fields
}
SQLWorker tuple.
func NewSQLWorker ¶
NewSQLWorker creates the new SQLWorker.
func (*SQLWorker) NextEvent ¶
NextEvent used to read the next event. If we get the end of the current binlog file and don't have next binlog, just returns (nil,nil).
func (*SQLWorker) RelayPosition ¶
RelayPosition returns the current binlog position which are read.
Click to show internal directories.
Click to hide internal directories.