store

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2016 License: Apache-2.0 Imports: 17 Imported by: 2 modules, 3 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 (
	//VolumeType is used to identify metadata for the libstorage layer
	VolumeType = 1
	//VolumeInternalLabelsType is used to identify metadata for the Polly admin layer
	VolumeInternalLabelsType = 2
	//VolumeAdminLabelsType is used to identify labels for the Polly admin layer
	VolumeAdminLabelsType = 3
)

Variables

View Source
var (
	//ErrObjectInvalid is an error for not being able to determine the key for an object
	ErrObjectInvalid = errors.New("Unable to determine root object path")
	//ErrInvalidStore is an error for not being able to determine the key for an object
	ErrInvalidStore = errors.New("Invalid store type")
	//ErrIndexOutOfBounds parsing a string has resulted in a -1
	ErrIndexOutOfBounds = errors.New("Index out of bounds")
)

Functions

This section is empty.

Types

type PollyStore

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

PollyStore representation of PollyStore

func NewWithConfig

func NewWithConfig(config gofig.Config) (pollystore *PollyStore, err error)

NewWithConfig This initializes new instance of this library

func (*PollyStore) Bucket

func (ps *PollyStore) Bucket() string

Bucket this get the type of backing store to use

func (*PollyStore) Delete

func (ps *PollyStore) Delete(key string) error

Delete removes a key value pair

func (*PollyStore) EndPoints

func (ps *PollyStore) EndPoints() string

EndPoints this gets the endpoints of the store

func (*PollyStore) EraseStore

func (ps *PollyStore) EraseStore() error

EraseStore erases the store

func (*PollyStore) EraseType

func (ps *PollyStore) EraseType(mytype int) error

EraseType erases a root of the store

func (*PollyStore) Exists

func (ps *PollyStore) Exists(volume *types.Volume) (bool, error)

Exists returns true if a key for the specified Volume exists in the store

func (*PollyStore) GenerateObjectKey

func (ps *PollyStore) GenerateObjectKey(mytype int, guid string) (path string, err error)

GenerateObjectKey generates the internal path (=key) for an object

func (*PollyStore) GenerateRootKey

func (ps *PollyStore) GenerateRootKey(mytype int) (path string, err error)

GenerateRootKey generates the internal path for root keys

func (*PollyStore) GetKeyFromFQKN

func (ps *PollyStore) GetKeyFromFQKN(fqkn string) (mykey string, err error)

GetKeyFromFQKN get the key name from the FQKN

func (*PollyStore) GetVolumeIds

func (ps *PollyStore) GetVolumeIds() (ids []string, err error)

GetVolumeIds return an array of IDs for all volumes in the store

func (*PollyStore) List

func (ps *PollyStore) List(key string) ([]*store.KVPair, error)

List lists the key values pairs for a key

func (*PollyStore) Put

func (ps *PollyStore) Put(key string, bytes []byte) error

Put saves key value pairs

func (*PollyStore) RemoveVolumeMetadata

func (ps *PollyStore) RemoveVolumeMetadata(volume *types.Volume) error

RemoveVolumeMetadata This function will save all metadata associated with a volume

func (*PollyStore) Root

func (ps *PollyStore) Root() string

Root this get the type of backing store to use

func (*PollyStore) SaveVolumeAdminLabels

func (ps *PollyStore) SaveVolumeAdminLabels(volume *types.Volume) error

SaveVolumeAdminLabels saves admin controlled labels associated with a volume

func (*PollyStore) SaveVolumeFields

func (ps *PollyStore) SaveVolumeFields(volume *types.Volume) error

SaveVolumeFields saves libstorage fields associated with a volume

func (*PollyStore) SaveVolumeMetadata

func (ps *PollyStore) SaveVolumeMetadata(volume *types.Volume) error

SaveVolumeMetadata saves all metadata associated with a volume

func (*PollyStore) SetVolumeAdminLabels

func (ps *PollyStore) SetVolumeAdminLabels(volume *types.Volume) error

SetVolumeAdminLabels sets volume admin labels from persistent store

func (*PollyStore) SetVolumeMetadata

func (ps *PollyStore) SetVolumeMetadata(volume *types.Volume) (bool, error)

SetVolumeMetadata This function will get all metadata associated with a volume

func (*PollyStore) StoreType

func (ps *PollyStore) StoreType() string

StoreType this generates the type of backing store to use

func (*PollyStore) Version

func (ps *PollyStore) Version() (string, error)

Version of the metadata in the store

Jump to

Keyboard shortcuts

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