safepool

package
v0.0.0-...-3f97823 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2022 License: Apache-2.0 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 struct {
	// contains filtered or unexported fields
}

func NewBufferPool

func NewBufferPool(newFn func() *bytes.Buffer) *BufferPool

func (*BufferPool) Get

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

func (*BufferPool) Put

func (p *BufferPool) Put(item *bytes.Buffer)

type ByteSlicePool

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

func NewByteSlicePool

func NewByteSlicePool(newFn func() []byte) *ByteSlicePool

func (*ByteSlicePool) Get

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

func (*ByteSlicePool) Put

func (p *ByteSlicePool) Put(item *[]byte)

type StringSlicePool

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

func NewStringSlicePool

func NewStringSlicePool(newFn func() []string) *StringSlicePool

func (*StringSlicePool) Get

func (p *StringSlicePool) Get() *[]string

func (*StringSlicePool) Put

func (p *StringSlicePool) Put(item *[]string)

Jump to

Keyboard shortcuts

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