store

package
v1.5.2-dev Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2019 License: Apache-2.0 Imports: 12 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

View Source
const (
	// available via portLayer API
	APIKV = "apiKV"
)

Variables

View Source
var (
	ErrDoesNotExist  = errors.New("requested store does not exist")
	ErrDuplicateName = errors.New("duplicate store name")
	ErrInvalidName   = errors.New("invalid store name, must be regexp(^[a-zA-Z0-9_]*$) compliant")
)

Functions

func Finalize added in v1.5.0

func Finalize(ctx context.Context) error

TODO: figure out why the Init calls are wrapped in once.Do - implies it can be called multiple times, but once Finalize is called things will not be functional.

func Init

func Init(ctx context.Context, session *session.Session, imgStoreURL *url.URL) error

Init will initialize the package vars and create the default portLayerKV store

Note: The imgStoreURL is provided by the portlayer init function and is currently based on the image-store specified at appliance creation via vic-machine. That URL is the starting point for the datastore persistence path and does not mean that the k/v stores are presisted w/the images.

func NewDatastoreKeyValue

func NewDatastoreKeyValue(ctx context.Context, session *session.Session, name string) (kvstore.KeyValueStore, error)

NewDatastoreKeyValue will validate the supplied name and create a datastore backed key / value store

The file will be located at the init datastoreURL -- currently that's in the appliance directory under the {dsFolder} folder (i.e. [datastore]vch-appliance/{dsFolder}/{name})

func Store

func Store(name string) (kvstore.KeyValueStore, error)

Store will return the requested store

Types

type StoreManager

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

Jump to

Keyboard shortcuts

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