pool

package
v0.0.0-...-38fe691 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2015 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Pool

type Pool struct {
	New   func() interface{}
	Close func(interface{}) error

	sync.Mutex
	// contains filtered or unexported fields
}

func New

func New() *Pool

func (*Pool) Clean

func (p *Pool) Clean()

func (*Pool) Get

func (p *Pool) Get() (item interface{})

func (*Pool) Len

func (p *Pool) Len() int

func (*Pool) MaxLen

func (p *Pool) MaxLen(n int)

func (*Pool) Put

func (p *Pool) Put(item interface{}) (err error)

Jump to

Keyboard shortcuts

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