pool

package
v0.0.0-...-edd4e79 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	BytePool       = NewByte()
	ByteBufferPool = NewByteBufferPool()
)
View Source
var (
	PublishPool = NewPublish()
)

Functions

func CopyPublish

func CopyPublish(dest *packets.Publish, src *packets.Publish)

Types

type Byte

type Byte struct {
	sync.Pool
}

func NewByte

func NewByte() *Byte

func (*Byte) Get

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

func (*Byte) Put

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

type ByteBuffer

type ByteBuffer struct {
	sync.Pool
}

func NewByteBufferPool

func NewByteBufferPool() *ByteBuffer

func (*ByteBuffer) Get

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

func (*ByteBuffer) Put

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

type Publish

type Publish struct {
	sync.Pool
}

func NewPublish

func NewPublish() *Publish

func (*Publish) Get

func (p *Publish) Get() *packets.Publish

func (*Publish) Put

func (p *Publish) Put(b *packets.Publish)

Jump to

Keyboard shortcuts

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