From ae10cf5936ec1b31f26a908d9512bf48f257b87d Mon Sep 17 00:00:00 2001 From: donnie Date: Wed, 22 Nov 2023 17:55:06 +0800 Subject: [PATCH] Update memory_buffer.go --- thrift/memory_buffer.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/thrift/memory_buffer.go b/thrift/memory_buffer.go index 5936d27..faa86ff 100644 --- a/thrift/memory_buffer.go +++ b/thrift/memory_buffer.go @@ -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()) -} +} \ No newline at end of file