Documentation
¶
Index ¶
- type Bucket
- type Entry
- type Map
- func (cm *Map[K, V]) ApproxLen() int
- func (m Map[K, V]) Contains(key K) bool
- func (m *Map[K, V]) Delete(key K)
- func (cm *Map[K, V]) Entry(key K) Entry[K, V]
- func (m Map[K, V]) Get(key K) (V, bool)
- func (m *Map[K, V]) GetOrCompute(key K, constructor func() (V, error)) (V, bool, error)
- func (m *Map[K, V]) Set(key K, value V)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bucket ¶
type Bucket[K comparable, V any] struct { sync.RWMutex Map map[K]V // contains filtered or unexported fields }
type Entry ¶
type Entry[K comparable, V any] struct { Key K Bucket *Bucket[K, V] }
func (Entry[K, V]) GetOrCompute ¶
type Map ¶
type Map[K comparable, V any] struct { Buckets []Bucket[K, V] // contains filtered or unexported fields }
func (*Map[K, V]) GetOrCompute ¶
Click to show internal directories.
Click to hide internal directories.