catalog

package
v0.0.0-...-5d1c7d3 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2014 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CATALOGFILE string = "index_catalog.dat" // contains gob data
)

Variables

This section is empty.

Functions

func NewIndexCatalog

func NewIndexCatalog(datadir, filename string) (c *catalog, err error)

Types

type IndexCatalog

type IndexCatalog interface {
	// Create builds an instance of index
	Create(indexInfo api.IndexInfo) (string, error)

	// Drop kills an instance of an index
	Drop(uuid string) (string, error)

	// If `ServerUuid` is not nil, then check to see if the local    ServerUUID
	// matches it. A match means client already has latest server
	// information and index data is not sent. A zero value makes    server send
	// the latest index data unconditionally.
	//
	// Returned list IndexInfo won't contain the index instance.
	List(ServerUuid string) (string, []api.IndexInfo, error)

	// Gets a specific instance
	Index(uuid string) (api.IndexInfo, error)

	// Get Uuid
	GetUuid() string

	//Check if index already exists for a given bucket
	Exists(name string, bucket string) error

	//Purge the catalog
	Purge() error
}

Jump to

Keyboard shortcuts

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