pool

package
v3.78.0 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2024 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Pool

type Pool struct {
	*sync.Pool
	// contains filtered or unexported fields
}

Pool of buffers.

func NewBufferPool

func NewBufferPool(size int) *Pool

NewBufferPool creates a new instance of BufferPool.

func (*Pool) Get

func (p *Pool) Get() *buffer.Buffer

Get returns a Buffer from the pool.

func (*Pool) Put

func (p *Pool) Put(buf *buffer.Buffer)

Put returns a Buffer to the pool.

Jump to

Keyboard shortcuts

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