test

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2024 License: Apache-2.0 Imports: 8 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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