Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BufferPool ¶
type BufferPool struct {
// contains filtered or unexported fields
}
BufferPool represent a buffer sync pool
func NewBufferPool ¶
func NewBufferPool(size int) (pool *BufferPool)
NewBufferPool create a new buffer pool of slice with some length and capacity
func (*BufferPool) Get ¶
func (pool *BufferPool) Get() (buffer []byte)
Get return some buffer from pool or create new one
func (*BufferPool) Put ¶
func (pool *BufferPool) Put(buffer []byte)
Put get some buffer and place back it to pool
Click to show internal directories.
Click to hide internal directories.