Documentation ¶
Overview ¶
Package event binlog event parse library functions
Index ¶
- Constants
- Variables
- func BinlogFileParser(files []string) error
- func BinlogFilter(event *replication.BinlogEvent) bool
- func BinlogParser()
- func BinlogStreamParser() error
- func CheckBinlogFileEncrypt(buf []byte) bool
- func CheckBinlogFileHeader(buf []byte) bool
- func CheckBinlogFileTime(files []string) error
- func CheckBinlogFormat(dsn string) string
- func DecryptBinlog(orgBinlog, keyring string) error
- func FileNextEvent(p *replication.BinlogParser, r io.Reader, stream cipher.Stream) (*replication.BinlogEvent, error)
- func FilterExcludeGTIDs(event *replication.BinlogEvent) bool
- func FilterIgnoreTables(event *replication.BinlogEvent) bool
- func FilterIncludeGTIDs(event *replication.BinlogEvent) bool
- func FilterQueryType(event *replication.BinlogEvent) bool
- func FilterServerID(event *replication.BinlogEvent) bool
- func FilterStartDatetime(event *replication.BinlogEvent) bool
- func FilterStartPos(event *replication.BinlogEvent) bool
- func FilterStopDatetime(event *replication.BinlogEvent) bool
- func FilterStopPos(event *replication.BinlogEvent) bool
- func FilterTables(event *replication.BinlogEvent) bool
- func FilterThreadID(event *replication.BinlogEvent) bool
- func InGTIDSet(sid []byte, gno int64, gtidSet string) bool
- func ParseEventHeader(buf []byte) (*replication.EventHeader, error)
- func TypeSwitcher(event *replication.BinlogEvent)
- func UpdateMasterInfo(event *replication.BinlogEvent)
- type EncryptHeader
- type KeyRing
Constants ¶
const ( FileHeaderLength = 4 // binlog file magic header 0XFE bin EventHeaderLength = 19 // event header length )
const EncryptFileHeaderOffset = 512
EncryptFileHeaderOffset encrypt file header size
const KeyRingXORStr = `*305=Ljt0*!@$Hnm(*-9-w;:`
KeyRingXORStr mysql-server: plugin/keyring/common/keyring_key.cc obfuscate_str
Variables ¶
var Ending bool
var FollowGTID bool
var FollowThreadID bool
var Starting bool
Functions ¶
func BinlogFileParser ¶
BinlogFileParser parser binary log file
func BinlogFilter ¶
func BinlogFilter(event *replication.BinlogEvent) bool
BinlogFilter check if event will do
func BinlogStreamParser ¶
func BinlogStreamParser() error
BinlogStreamParser parser mysql connection replication event
func CheckBinlogFileEncrypt ¶
CheckBinlogFileEncrypt check file is encrypted
func CheckBinlogFileHeader ¶
CheckBinlogFileHeader check file is binary log
func CheckBinlogFormat ¶
CheckBinlogFormat check binlog format
func DecryptBinlog ¶
DecryptBinlog decrypt binlog file with keyring
func FileNextEvent ¶
func FileNextEvent(p *replication.BinlogParser, r io.Reader, stream cipher.Stream) (*replication.BinlogEvent, error)
FileNextEvent ...
func FilterExcludeGTIDs ¶
func FilterExcludeGTIDs(event *replication.BinlogEvent) bool
FilterExcludeGTIDs ...
func FilterIgnoreTables ¶
func FilterIgnoreTables(event *replication.BinlogEvent) bool
FilterIgnoreTables ...
func FilterIncludeGTIDs ¶
func FilterIncludeGTIDs(event *replication.BinlogEvent) bool
FilterIncludeGTIDs ...
func FilterQueryType ¶
func FilterQueryType(event *replication.BinlogEvent) bool
FilterQueryType ...
func FilterStartDatetime ¶
func FilterStartDatetime(event *replication.BinlogEvent) bool
FilterStartDatetime ...
func FilterStopDatetime ¶
func FilterStopDatetime(event *replication.BinlogEvent) bool
FilterStopDatetime ...
func ParseEventHeader ¶
func ParseEventHeader(buf []byte) (*replication.EventHeader, error)
ParseEventHeader parser event header, in go-mysql it's internal func, make it public
func TypeSwitcher ¶
func TypeSwitcher(event *replication.BinlogEvent)
TypeSwitcher event router by type