Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var BytePool = NewPool[byte]()
View Source
var ErrorPool = NewPool[error]()
View Source
var IntPool = NewPool[int]()
View Source
var StringPool = NewPool[string]()
Functions ¶
This section is empty.
Types ¶
type BufferPool ¶
func NewBufferPool ¶
func NewBufferPool() BufferPool
func (BufferPool) Get ¶
func (bp BufferPool) Get(size int) Buffer
type SlicePool ¶
type SlicePool[T any] struct { // contains filtered or unexported fields }
base refrence: https://github.com/panjf2000/gnet/blob/v1.6.7/pkg/pool/byteslice/byteslice.go
Click to show internal directories.
Click to hide internal directories.