test

package
v1.3.0-alpha.3 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InMemoryKVStore

type InMemoryKVStore map[string][]byte

func NewInMemoryKVStore

func NewInMemoryKVStore() InMemoryKVStore

func (InMemoryKVStore) Del

func (im InMemoryKVStore) Del(k []byte)

func (InMemoryKVStore) Get

func (im InMemoryKVStore) Get(k []byte) []byte

func (InMemoryKVStore) Has

func (im InMemoryKVStore) Has(k []byte) bool

func (InMemoryKVStore) Iterate

func (im InMemoryKVStore) Iterate(f func(k []byte, v []byte) bool)

func (InMemoryKVStore) IterateKeys

func (im InMemoryKVStore) IterateKeys(f func(k []byte) bool)

func (InMemoryKVStore) Iterator

func (im InMemoryKVStore) Iterator(prefix []byte) trie.KVIterator

func (InMemoryKVStore) Set

func (im InMemoryKVStore) Set(k, v []byte)

type PseudoRandStreamIterator

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

func NewPseudoRandStreamIterator

func NewPseudoRandStreamIterator(p ...PseudoRandStreamParams) *PseudoRandStreamIterator

func (*PseudoRandStreamIterator) Iterate

func (r *PseudoRandStreamIterator) Iterate(fun func(k []byte, v []byte) bool) error

type PseudoRandStreamParams

type PseudoRandStreamParams struct {
	// Seed for deterministic randomization
	Seed int64
	// NumKVPairs maximum number of key value pairs to generate. 0 means infinite
	NumKVPairs int
	// MaxKey maximum length of key (randomly generated)
	MaxKey int
	// MaxValue maximum length of value (randomly generated)
	MaxValue int
}

PseudoRandStreamParams represents parameters of the RandStreamIterator

Jump to

Keyboard shortcuts

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