Documentation ¶
Index ¶
- type SlotStorage
- func (e *SlotStorage[K, V]) Evict(index slot.Index) (evictedStorage *shrinkingmap.ShrinkingMap[K, V])
- func (e *SlotStorage[K, V]) ForEach(f func(index slot.Index, storage *shrinkingmap.ShrinkingMap[K, V]))
- func (e *SlotStorage[K, V]) Get(index slot.Index, createIfMissing ...bool) (storage *shrinkingmap.ShrinkingMap[K, V])
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SlotStorage ¶
type SlotStorage[K comparable, V any] struct { // contains filtered or unexported fields }
SlotStorage is an evictable storage that stores storages for slots.
func NewSlotStorage ¶
func NewSlotStorage[K comparable, V any]() *SlotStorage[K, V]
NewSlotStorage creates a new slot storage.
func (*SlotStorage[K, V]) Evict ¶
func (e *SlotStorage[K, V]) Evict(index slot.Index) (evictedStorage *shrinkingmap.ShrinkingMap[K, V])
Evict evicts the storage for the given index.
func (*SlotStorage[K, V]) ForEach ¶
func (e *SlotStorage[K, V]) ForEach(f func(index slot.Index, storage *shrinkingmap.ShrinkingMap[K, V]))
ForEach iterates over all storages.
func (*SlotStorage[K, V]) Get ¶
func (e *SlotStorage[K, V]) Get(index slot.Index, createIfMissing ...bool) (storage *shrinkingmap.ShrinkingMap[K, V])
Get returns the storage for the given index.
Click to show internal directories.
Click to hide internal directories.