Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Put ¶
func Put[T Bytes | BytesBuffer](buf T)
Put puts the buffer(either Bytes or BytesBuffer) back to the pool.
func WithBuffer ¶
func WithBuffer(fn func(BytesBuffer) error, size ...uint64) error
WithBuffer relies on GetBuffer to get a buffer, calls the function with the buffer, finally, puts it back to the pool after the function returns.
Types ¶
type BytesBuffer ¶
func GetBuffer ¶
func GetBuffer(size ...uint64) BytesBuffer
GetBuffer is similar to GetBytes, but it returns the bytes buffer wrapped by bytes.Buffer.
Click to show internal directories.
Click to hide internal directories.