Versions in this module Expand all Collapse all v0 v0.0.4 Jun 30, 2024 Changes in this version + var DefaultPool = New(128, 65536) + func Get(size int) (interface{}, int) + func Put(x interface{}, size int) + type Config interface + AddSize func(n int) + SetSizeMapping func(func(int) int) + type Option func(Config) + func WithIdentitySizeMapping() Option + func WithLogSizeMapping() Option + func WithLogSizeRange(min, max int) Option + func WithSize(n int) Option + func WithSizeMapping(sz func(int) int) Option + type Pool struct + func Custom(opts ...Option) *Pool + func New(min, max int) *Pool + func (p *Pool) Get(size int) (interface{}, int) + func (p *Pool) Put(x interface{}, size int)