bytes

package
v0.0.0-...-2b30333 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2016 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Buffer

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

func (*Buffer) Bytes

func (b *Buffer) Bytes() []byte

type Pool

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

Pool is a buffer pool.

func NewPool

func NewPool(num, size int) (p *Pool)

NewPool new a memory buffer pool struct.

func (*Pool) Get

func (p *Pool) Get() (b *Buffer)

Get get a free memory buffer.

func (*Pool) Init

func (p *Pool) Init(num, size int)

Init init the memory buffer.

func (*Pool) Put

func (p *Pool) Put(b *Buffer)

Put put back a memory buffer to free.

type Writer

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

func NewWriterSize

func NewWriterSize(n int) *Writer

func (*Writer) Buffer

func (w *Writer) Buffer() []byte

func (*Writer) Peek

func (w *Writer) Peek(n int) []byte

func (*Writer) Reset

func (w *Writer) Reset()

func (*Writer) Size

func (w *Writer) Size() int

func (*Writer) Write

func (w *Writer) Write(p []byte)

Jump to

Keyboard shortcuts

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