test_store

package
v0.0.0-...-fdc8e6b Latest Latest
Warning

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

Go to latest
Published: May 13, 2022 License: Unlicense Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TestStorage

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

func NewTestStorage

func NewTestStorage() *TestStorage

func (*TestStorage) Close

func (m *TestStorage) Close()

func (*TestStorage) Flush

func (m *TestStorage) Flush() error

func (*TestStorage) Insert

func (m *TestStorage) Insert(key string, value []byte) error

func (*TestStorage) Len

func (m *TestStorage) Len() uint

func (*TestStorage) Remove

func (m *TestStorage) Remove(key string) error

func (*TestStorage) Retrieve

func (m *TestStorage) Retrieve(key string) ([]byte, error)

func (*TestStorage) Size

func (m *TestStorage) Size() uint64

Size will not be accurate for an in-memory Store

type TestStoreBench

type TestStoreBench struct {
	Keys  []string
	Store *TestStorage
	Size  int
}

func NewTestStoreBench

func NewTestStoreBench() *TestStoreBench

func (*TestStoreBench) FillStore

func (tsb *TestStoreBench) FillStore(insertFunc func(string, []byte) error, n int)

FillStore requires at least n mininum keys already in the TestStore - call MinSize first

func (*TestStoreBench) MinSize

func (tsb *TestStoreBench) MinSize(n int)

Jump to

Keyboard shortcuts

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