Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // File and offset describe current state. // File is the name of the binary log file. File string // Offset is the binary offset of the first event in the binary log file, // a starting point at which processing should begin. Offset uint32 // ServerID should be a unique replica server identifier (i guess). ServerID uint32 // Hostname along with server ID is used to identify the replica server // connection. Hostname string }
Config contains all the details necessary to establish a replica connection.
type Conn ¶
type Conn struct {
// contains filtered or unexported fields
}
Conn is a connection used to issue a binlog dump command.
func Connect ¶
Connect esablishes a new database connection. It is a go-sql-driver connection with a few low level functions exposed and with a high level wrapper that allows to execute just a few commands that are required for operation.
func (*Conn) DisableChecksum ¶
DisableChecksum disables CRC32 checksums for this connection.
func (*Conn) ReadPacket ¶
ReadPacket reads next packet from the server and peeks at the status byte.
func (*Conn) RegisterSlave ¶
RegisterSlave issues a REGISTER_SLAVE command to master. Spec: https://dev.mysql.com/doc/internals/en/com-register-slave.html
func (*Conn) StartBinlogDump ¶
StartBinlogDump issues a BINLOG_DUMP command to master. Spec: https://dev.mysql.com/doc/internals/en/com-binlog-dump.html TODO: https://dev.mysql.com/doc/internals/en/com-binlog-dump-gtid.html