Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BufferPool ¶
type BufferPool struct { // Slice of byte slices to store trace segments. Buffers []*[]byte // contains filtered or unexported fields }
BufferPool is a structure for storing trace segments.
func Init ¶
func Init(bufferLimit int, bufferSize int) *BufferPool
Init initializes new BufferPool with bufferLimit buffers, each of bufferSize.
func (*BufferPool) CurrentBuffersLen ¶
func (b *BufferPool) CurrentBuffersLen() int
CurrentBuffersLen returns length of buffers.
func (*BufferPool) Get ¶
func (b *BufferPool) Get() *[]byte
Get returns available buffer of BufferPool b, nil if not any.
func (*BufferPool) Return ¶
func (b *BufferPool) Return(buf *[]byte)
Return adds buffer buf to BufferPool b.
Click to show internal directories.
Click to hide internal directories.