sharded

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 1, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const ShardCount = 2048

Variables

This section is empty.

Functions

This section is empty.

Types

type Map

type Map[K comparable, V Sizer] struct {
	// contains filtered or unexported fields
}

func NewMap

func NewMap[K comparable, V Sizer](defaultLen int) *Map[K, V]

func (*Map[K, V]) Del

func (m *Map[K, V]) Del(key K)

func (*Map[K, V]) Get

func (m *Map[K, V]) Get(key K, shardKey uint) (value V, found bool)

func (*Map[K, V]) GetShardKey

func (m *Map[K, V]) GetShardKey(key K) uint

func (*Map[K, V]) Has

func (m *Map[K, V]) Has(key K) bool

func (*Map[K, V]) Len

func (m *Map[K, V]) Len() int64

func (*Map[K, V]) Mem

func (m *Map[K, V]) Mem() uintptr

func (*Map[K, V]) Rng

func (m *Map[K, V]) Rng(fn func(K, V))

func (*Map[K, V]) Set

func (m *Map[K, V]) Set(key K, value V)

type Sizer

type Sizer interface {
	Size() uintptr
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL