Skip to content

Commit d1fe1f2

Browse files
author
Dylan Terry
committed
Add BinlogEvent.ByteLen func
1 parent 5942cc6 commit d1fe1f2

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

replication/event.go

+5
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@ func (e *BinlogEvent) Dump(w io.Writer) {
3838
e.Event.Dump(w)
3939
}
4040

41+
// ByteLen returns the total size of the raw event data in bytes.
42+
func (e *BinlogEvent) ByteLen() int {
43+
return len(e.RawData)
44+
}
45+
4146
type Event interface {
4247
// Dump Event, format like python-mysql-replication
4348
Dump(w io.Writer)

0 commit comments

Comments
 (0)