Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Fast16WayHashMatch ¶
Fast16WayHashMatch performs a 16-way linear probing of short hash (h2, metadata) list by SSE instructions short hash list must be an aligned pointer
Types ¶
type Hasher ¶
type Hasher[K comparable] struct { // contains filtered or unexported fields }
type Map ¶
type Map[K comparable, V any] interface { Put(key K, val V) error Get(key K) (item V, exists bool) Delete(key K) (V, error) Foreach(action func(i uint64, key K, val V) (_continue bool)) MigrateFrom(m map[K]V) error Clear() Len() int64 }
func NewSwissMap ¶
func NewSwissMap[K comparable, V any](capacity uint32) Map[K, V]
type SafeStoreKeyFilterFunc ¶
type SafeStoreKeyFilterFunc[K comparable] func(key K) bool
type ThreadSafeMapOption ¶
type ThreadSafeMapOption[K comparable, V any] func(*threadSafeMap[K, V]) error
func WithThreadSafeMapCloseableItemCheck ¶
func WithThreadSafeMapCloseableItemCheck[K comparable, V any]() ThreadSafeMapOption[K, V]
func WithThreadSafeMapInitCap ¶
func WithThreadSafeMapInitCap[K comparable, V any](capacity uint32) ThreadSafeMapOption[K, V]
type ThreadSafeStorer ¶
type ThreadSafeStorer[K comparable, V any] interface { Purge() error AddOrUpdate(key K, obj V) error Get(key K) (item V, exists bool) Delete(key K) (V, error) Replace(items map[K]V) error ListKeys(filters ...SafeStoreKeyFilterFunc[K]) []K ListValues(keys ...K) (items []V) }
func NewThreadSafeMap ¶
func NewThreadSafeMap[K comparable, V any](opts ...ThreadSafeMapOption[K, V]) ThreadSafeStorer[K, V]
Source Files
¶
Click to show internal directories.
Click to hide internal directories.