Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var MarshalerPool easyproto.MarshalerPool
Functions ¶
This section is empty.
Types ¶
type BufferPool ¶
type BufferPool struct {
// contains filtered or unexported fields
}
BufferPool manages a pool of Buffers.
func NewBufferPool ¶
func NewBufferPool(poolSliceSize uint32) BufferPool
NewBufferPool creates a BufferPool with a specified size.
func (BufferPool) Get ¶
func (pool BufferPool) Get(size uint32) *Buffer
Get retrieves a Buffer from the pool or creates a new one if necessary. It ensures the buffer's capacity is at least the specified size.
func (BufferPool) PoolSliceSize ¶
func (pool BufferPool) PoolSliceSize() uint32
PoolSliceSize returns the size for buffer slices in the pool.
func (BufferPool) Put ¶
func (pool BufferPool) Put(buf *Buffer)
Put returns a Buffer to the pool if its capacity does not exceed poolSliceSize.
Click to show internal directories.
Click to hide internal directories.