Skip to content

Commit

Permalink
Update memory_buffer.go
Browse files Browse the repository at this point in the history
  • Loading branch information
donnie4w committed Nov 22, 2023
1 parent 15ee811 commit ae10cf5
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion thrift/memory_buffer.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,14 @@ func (p *TMemoryBuffer) Flush(ctx context.Context) error {
return nil
}

func (p *TMemoryBuffer) Bytes() []byte {
return p.Buffer.Bytes()
}

func (p *TMemoryBuffer) Write(buf []byte) (n int, e error) {
return p.Buffer.Write(buf)
}

func (p *TMemoryBuffer) RemainingBytes() (num_bytes uint64) {
return uint64(p.Buffer.Len())
}
}

0 comments on commit ae10cf5

Please sign in to comment.