diff --git a/replication/event.go b/replication/event.go index dacd49b02..e9ece396a 100644 --- a/replication/event.go +++ b/replication/event.go @@ -38,6 +38,11 @@ func (e *BinlogEvent) Dump(w io.Writer) { e.Event.Dump(w) } +// ByteLen returns the total size of the raw event data in bytes. +func (e *BinlogEvent) ByteLen() int { + return len(e.RawData) +} + type Event interface { // Dump Event, format like python-mysql-replication Dump(w io.Writer)