bufferpool

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2024 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Put

func Put(b *Buffer)

Put places the buffer into the pool.

Types

type Buffer

type Buffer struct {
	B []byte
	// contains filtered or unexported fields
}

func GetBuffer

func GetBuffer(size int) *Buffer

GetBuffer returns a buffer from the pool, or creates a new one. The returned buffer has at least the requested capacity.

func (*Buffer) ReadFrom

func (b *Buffer) ReadFrom(r io.Reader) (int64, error)

Jump to

Keyboard shortcuts

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