wormmap

package
v0.0.0-...-05bc493 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Entry

type Entry struct {
	Key
	Value
	UserMeta uint32
}

func NewByteEntry

func NewByteEntry(key, value []byte) Entry

func NewEntry

func NewEntry(key Key, value Value) Entry

func (Entry) WithMeta

func (e Entry) WithMeta(meta uint32) Entry

type EntryMapLoaderFunc

type EntryMapLoaderFunc func(bucketIndex int, addFn func(Entry) bool) (remainingBuckets int, fnResult bool)

type Key

type Key = longbits.ByteString

type LazyEntryMap

type LazyEntryMap struct {
	// contains filtered or unexported fields
}

func NewLazyEntryMap

func NewLazyEntryMap(prefixLen uint8, expectedKeyCount int, hashSeed uint32, loaderFn EntryMapLoaderFunc) LazyEntryMap

func (*LazyEntryMap) Contains

func (p *LazyEntryMap) Contains(k keyset.Key) bool

func (*LazyEntryMap) Count

func (p *LazyEntryMap) Count() int

func (*LazyEntryMap) EnumKeys

func (p *LazyEntryMap) EnumKeys(fn func(k keyset.Key) bool) bool

type MapHolder

type MapHolder interface {
	Len() int
	Get(Key) (interface{}, bool)
	Set(Key, interface{})
	EnumKeys(func(keyset.Key) bool) bool
	EnumEntries(func(keyset.Key, interface{}) bool) bool
}

type Value

type Value = []byte

Jump to

Keyboard shortcuts

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