buffutil

package
v1.13.4 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2023 License: MIT Imports: 3 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
}

func NewBufferPool

func NewBufferPool() *BufferPool

func NewBufferPoolWithSize

func NewBufferPoolWithSize(buffInitSize int) *BufferPool

func (*BufferPool) Get

func (p *BufferPool) Get() RecyclableBuffer

func (*BufferPool) Put

func (p *BufferPool) Put(b RecyclableBuffer)

type RecyclableBuffer

type RecyclableBuffer struct {
	*bytes.Buffer
	// contains filtered or unexported fields
}

func (RecyclableBuffer) Close

func (b RecyclableBuffer) Close() error

func (RecyclableBuffer) Closed

func (b RecyclableBuffer) Closed() bool

type SlicePool

type SlicePool[T any] struct {
	// contains filtered or unexported fields
}

func NewSlicePool

func NewSlicePool[T any](initCap int) *SlicePool[T]

func (*SlicePool[T]) Get

func (p *SlicePool[T]) Get() []T

func (*SlicePool[T]) Put

func (p *SlicePool[T]) Put(v []T)

Jump to

Keyboard shortcuts

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