buffer

package
v0.0.0-...-b1bf5db Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 18, 2017 License: MIT Imports: 4 Imported by: 1

Documentation

Index

Constants

View Source
const (
	MaxGCTime = time.Second
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Buffer

type Buffer struct {
	*bytes.Buffer
	Encrypt bool
	// contains filtered or unexported fields
}

func NewBuffer

func NewBuffer() *Buffer

func (*Buffer) Add

func (buf *Buffer) Add(n uint32)

func (*Buffer) Done

func (buf *Buffer) Done()

func (*Buffer) GC

func (buf *Buffer) GC(maxTime time.Duration) bool

func (*Buffer) Reset

func (buf *Buffer) Reset()

type BufferPool

type BufferPool struct {
	// contains filtered or unexported fields
}

func NewBufferPool

func NewBufferPool(initSize, maxSize int) *BufferPool

func (*BufferPool) Get

func (bp *BufferPool) Get() (buf *Buffer, fromPool bool)

func (*BufferPool) Put

func (bp *BufferPool) Put(buf *Buffer, fromPool bool)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL