bufferpool

package
v0.0.0-...-a2e0f46 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0, BSD-3-Clause, MIT Imports: 2 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 interface {
	Get() *bytes.Buffer
	Put(buffer *bytes.Buffer)
}

BufferPool buffer pool interface

func NewBuffer

func NewBuffer(poolSize int) BufferPool

NewBuffer news a buffer pool

func NewSizedBuffer

func NewSizedBuffer(poolSize, bufferSize int) BufferPool

NewSizedBuffer news a buffer pool with specific buffer size

type BytePool

type BytePool interface {
	Get() []byte
	Put(b []byte)
}

BytePool byte pool interface

func NewBytePool

func NewBytePool(poolSize, length int) BytePool

NewBytePool news a byte pool

Jump to

Keyboard shortcuts

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