bufferpool

package
v10.231.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2019 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BufferPool

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

BufferPool implements the interface of httputil.BufferPool in order to improve memory utilization in the reverse proxy.

func NewPool

func NewPool(size int) *BufferPool

NewPool creates a new BufferPool.

func (*BufferPool) Get

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

Get gets a buffer from the pool.

func (*BufferPool) Put

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

Put returns the buffer to the pool.

Jump to

Keyboard shortcuts

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