Versions in this module Expand all Collapse all v2 v2.0.0 Aug 1, 2022 Changes in this version + type Map struct + func NewMap() *Map + func (m *Map) Delete(key interface{}) + func (m *Map) DeleteWithFunc(key interface{}, onDeleteFunc func(value interface{})) + func (m *Map) Length() int + func (m *Map) Load(key interface{}) (value interface{}, ok bool) + func (m *Map) LoadOrStore(key, value interface{}) (actual interface{}, loaded bool) + func (m *Map) LoadOrStoreWithFunc(key interface{}, onLoadFunc func(value interface{}) interface{}, ...) (actual interface{}, loaded bool) + func (m *Map) LoadWithFunc(key interface{}, onLoadFunc func(value interface{}) interface{}) (value interface{}, ok bool) + func (m *Map) PullOut(key interface{}) (value interface{}, ok bool) + func (m *Map) PullOutAll() (data map[interface{}]interface{}) + func (m *Map) PullOutWithFunc(key interface{}, onLoadFunc func(value interface{}) interface{}) (value interface{}, ok bool) + func (m *Map) Range(f func(key, value interface{}) bool) + func (m *Map) Replace(key, value interface{}) (oldValue interface{}, oldLoaded bool) + func (m *Map) ReplaceWithFunc(key interface{}, ...) (oldValue interface{}, oldLoaded bool) + func (m *Map) Store(key, value interface{}) + func (m *Map) StoreWithFunc(key interface{}, createFunc func() interface{}) + type Once struct + func (o *Once) Done() bool + func (o *Once) Try(f func() bool) + type Pool struct + func NewPool() *Pool + func (p *Pool) Delete(key string) (_ interface{}, ok bool) + func (p *Pool) Get(key string) (_ interface{}, ok bool) + func (p *Pool) GetOrCreate(ctx context.Context, key string) (interface{}, error) + func (p *Pool) Put(key string, item interface{}) + func (p *Pool) SetFactory(f PoolFunc) + type PoolFunc func(ctx context.Context, key string) (interface{}, error) + type RefCounter struct + func NewRefCounter(data interface{}, releaseDataFunc ReleaseDataFunc) *RefCounter + func (r *RefCounter) Acquire() + func (r *RefCounter) Count() int64 + func (r *RefCounter) Data() interface{} + func (r *RefCounter) Release(ctx context.Context) error + type ReleaseDataFunc = func(ctx context.Context, data interface{}) error