Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type DynamicPool ¶
type DynamicPool struct {
// contains filtered or unexported fields
}
func NewDynamicPool ¶
func NewDynamicPool(size uint, newFunc func() (interface{}, error), putFunc func(interface{})) *DynamicPool
func (*DynamicPool) Free ¶
func (p *DynamicPool) Free() uint
func (*DynamicPool) Put ¶
func (p *DynamicPool) Put(v interface{}) error
func (*DynamicPool) Size ¶
func (p *DynamicPool) Size() uint
type StaticPool ¶
type StaticPool struct {
// contains filtered or unexported fields
}
func NewStaticPool ¶
func NewStaticPool(size uint, newFunc func() (interface{}, error), putFunc func(interface{})) *StaticPool
func (*StaticPool) Free ¶
func (p *StaticPool) Free() uint
func (*StaticPool) Put ¶
func (p *StaticPool) Put(v interface{}) error
func (*StaticPool) Size ¶
func (p *StaticPool) Size() uint
Click to show internal directories.
Click to hide internal directories.