bufferpool

package
v10.288.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2020 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