bufferpool

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxLocalCacheLen             = 8
	MaxChunkMetaBufLocalCacheLen = 1024
	MaxLocalCacheSize            = 32 * 1024 * 1024 // 32M
)

Variables

This section is empty.

Functions

func Get

func Get() []byte

func GetPoints

func GetPoints() []byte

func Put

func Put(b []byte)

func PutPoints

func PutPoints(b []byte)

func Resize

func Resize(b []byte, n int) []byte

Types

type Pool

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

func NewByteBufferPool

func NewByteBufferPool(defaultSize uint64, localCacheNum int, maxCacheLen int) *Pool

func (*Pool) Get

func (p *Pool) Get() []byte

func (*Pool) Put

func (p *Pool) Put(b []byte)

Jump to

Keyboard shortcuts

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