Versions in this module Expand all Collapse all v1 v1.0.1 Apr 8, 2021 Changes in this version + type LockStore interface + Lock func(key string) + RLock func(key string) + RUnlock func(key string) + TryLock func(key string, timeout time.Duration) (success bool) + TryRLock func(key string, timeout time.Duration) (success bool) + Unlock func(key string) + func New(options LockStoreOptions) LockStore + type LockStoreOptions struct + Granularity LockingGranularity + LockCount int + type LockingGranularity int + const PerKeyGranularity + const ShardedGranularity + const StoreGranularity + type LockingMap interface + Add func(string, interface{}) bool + AddOrGet func(string, LockingMapAddFunc) (interface{}, error) + Delete func(string) + Get func(string) (interface{}, bool) + Set func(string, interface{}) + func NewLockingMap(options LockingMapOptions) LockingMap + type LockingMapAddFunc func(string) (interface{}, error) + type LockingMapCheckFunc func(string, interface{}) bool + type LockingMapOptions struct + LockStoreOptions LockStoreOptions + ValueCheckFunc LockingMapCheckFunc