pool

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetBuf

func GetBuf(size int) []byte

func GetSnappyReader

func GetSnappyReader(r io.Reader) *snappy.Reader

func GetSnappyWriter

func GetSnappyWriter(w io.Writer) *snappy.Writer

func PutBuf

func PutBuf(buf []byte)

func PutSnappyReader

func PutSnappyReader(sr *snappy.Reader)

func PutSnappyWriter

func PutSnappyWriter(sw *snappy.Writer)

Types

type Pool

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

func NewPool

func NewPool(size int) *Pool

func (*Pool) Get

func (c *Pool) Get() []byte

func (*Pool) Put

func (c *Pool) Put(buf []byte)

Jump to

Keyboard shortcuts

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