testsuite

package
v0.31.10 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2020 License: AGPL-3.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BenchmarkPathOperationsInLargeDb

func BenchmarkPathOperationsInLargeDb(b *testing.B, store storage.KeyValueStore)

BenchmarkPathOperationsInLargeDb runs the "long benchmarks" suite for KeyValueStore instances.

func RunBenchmarks

func RunBenchmarks(b *testing.B, store storage.KeyValueStore)

RunBenchmarks runs common storage.KeyValueStore benchmarks

func RunTests

func RunTests(t *testing.T, store storage.KeyValueStore)

RunTests runs common storage.KeyValueStore tests

Types

type BulkCleaner

type BulkCleaner interface {
	BulkDeleteAll(ctx context.Context) error
}

BulkCleaner identifies KV storage facilities that can delete all items efficiently.

type BulkDeleter added in v0.28.0

type BulkDeleter interface {
	BulkDelete(context.Context, storage.Items) error
}

BulkDeleter identifies KV storage facilities that can delete multiple items efficiently.

type BulkImporter

type BulkImporter interface {
	BulkImport(context.Context, storage.Iterator) error
}

BulkImporter identifies KV storage facilities that can do bulk importing of items more efficiently than inserting one-by-one.

type KVInputIterator

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

KVInputIterator is passed to the BulkImport method on BulkImporter-satisfying objects. It will iterate over a fairly large list of paths that should be imported for testing purposes.

func (*KVInputIterator) Error

func (kvi *KVInputIterator) Error() error

Error() returns the last error encountered while iterating over the input file. This must be checked after iteration completes, at least.

func (*KVInputIterator) Next

func (kvi *KVInputIterator) Next(ctx context.Context, item *storage.ListItem) bool

Next should be called by BulkImporter instances in order to advance the iterator. It fills in a storage.ListItem instance, and returns a boolean indicating whether to continue. When false is returned, iteration should stop and nothing is expected to be changed in item.

Jump to

Keyboard shortcuts

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