mock

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: May 6, 2014 License: Apache-2.0 Imports: 7 Imported by: 3

Documentation

Overview

Package mock provides a fake, mock 100%-in-memory implementation of the catalog package, which can be useful for testing. Because it is memory-oriented, performance testing of higher layers may be easier with this mock catalog.

Index

Constants

View Source
const (
	DEFAULT_NUM_POOLS   = 1
	DEFAULT_NUM_BUCKETS = 1
	DEFAULT_NUM_ITEMS   = 100000
)

Variables

This section is empty.

Functions

func NewSite

func NewSite(path string) (catalog.Site, query.Error)

NewSite creates a new mock site for the given "path". The path has prefix "mock:", with the rest of the path treated as a comma-separated key=value params. For example:

mock:pools=2,buckets=5,items=50000

The above means 2 pools. And, each pool has 5 buckets. And, each bucket with 50000 items. By default, you get...

mock:pools=1,buckets=1,items=100000

Which is what you'd get by specifying a path of just...

mock:

Types

This section is empty.

Jump to

Keyboard shortcuts

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