rbp

package module
v0.0.0-...-79f4ed7 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2018 License: MIT Imports: 4 Imported by: 0

README

rbp

Recycled buffer pool

Go Report Card CircleCI

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BufferPool

type BufferPool struct {
	BufferSize int
	Lifetime   time.Duration
	// contains filtered or unexported fields
}

BufferPool implements httputil.BufferPool.

func NewBufferPool

func NewBufferPool(options ...func(*BufferPool)) *BufferPool

NewBufferPool constructs and starts a BufferPool

func (*BufferPool) Get

func (bp *BufferPool) Get() []byte

Get returns a []byte slice from the pool.

func (*BufferPool) Put

func (bp *BufferPool) Put(b []byte)

Put returns a []byte slice to the pool.

func (*BufferPool) Stats

func (bp *BufferPool) Stats() stat

Stats returns BufferPool statistics.

Source Files

  • buffer.go

Jump to

Keyboard shortcuts

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