Versions in this module Expand all Collapse all v1 v1.0.0 Dec 5, 2019 Changes in this version + type Config struct + Creator CreatorFunc + Destroyer DestroyerFunc + type CreatorFunc func(p *Pool, id Id) (resource interface{}, err error) + type DestroyerFunc func(p *Pool, resource interface{}) (err error) + type Id int64 + type Options struct + Idle int64 + Max int + Min int + type Pool struct + Config Config + Destroyed bool + Options Options + Pool *SafeMap + func New(c Config, o Options) (p *Pool, err error) + func (p *Pool) Destroy() (err error) + func (p *Pool) Get() (interface{}, error) + func (p *Pool) Release(id Id) (err error) + type Resource struct + Id Id + Idle bool + LastUseAt time.Time + Resource interface{} + UseCount int + type SafeMap struct + func NewSafeMap() *SafeMap + func (m *SafeMap) Check(k interface{}) bool + func (m *SafeMap) Count() int + func (m *SafeMap) Delete(k interface{}) + func (m *SafeMap) Get(k interface{}) interface{} + func (m *SafeMap) Items() map[interface{}]interface{} + func (m *SafeMap) Set(k interface{}, v interface{}) bool