Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ReleaseTimer ¶
Types ¶
type Allocator ¶
type Allocator struct {
// contains filtered or unexported fields
}
func NewAllocator ¶
NewAllocator initiates a []byte allocatorL. []byte that has less than 1 << maxPoolBitsLen bytes is managed by sync.Pool. The waste(memory fragmentation) of space allocation is guaranteed to be no more than 50%.
type Buffer ¶
type Buffer struct {
// contains filtered or unexported fields
}
func PackBuffer ¶
PackBuffer packs the dns msg m to wire format. Callers should release the buf after they have done with the wire []byte.
type BytesBufPool ¶
type BytesBufPool struct {
// contains filtered or unexported fields
}
func NewBytesBufPool ¶
func NewBytesBufPool(initSize int) *BytesBufPool
func (*BytesBufPool) Get ¶
func (p *BytesBufPool) Get() *bytes.Buffer
func (*BytesBufPool) Release ¶
func (p *BytesBufPool) Release(b *bytes.Buffer)
Click to show internal directories.
Click to hide internal directories.