poolutil

package
v2.0.23 Latest Latest
Warning

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

Go to latest
Published: May 6, 2024 License: Apache-2.0 Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BytesBuffer1024 = NewBytesBuffer(1024)

Functions

This section is empty.

Types

type Bytes

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

func NewBytes

func NewBytes(length int, width int) (bp *Bytes)

func (*Bytes) Get

func (p *Bytes) Get() (b []byte)

func (*Bytes) Put

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

type BytesBuffer

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

func NewBytesBuffer

func NewBytesBuffer(capacity int) *BytesBuffer

func (*BytesBuffer) Get

func (p *BytesBuffer) Get() *bytes.Buffer

func (*BytesBuffer) Put

func (p *BytesBuffer) Put(b *bytes.Buffer)

type Pool

type Pool[T any] interface {
	Get() T
	Put(T)
}

Jump to

Keyboard shortcuts

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