cache

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2019 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type VolumeLookupCache

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

VolumeLookupCache caches Volume references to volumes in the system.

func NewVolumeLookupCache

func NewVolumeLookupCache(op trace.Operation) *VolumeLookupCache

func (*VolumeLookupCache) AddStore

func (v *VolumeLookupCache) AddStore(op trace.Operation, storeName string, vs volume.VolumeStorer) (*url.URL, error)

AddStore adds a volumestore by name. The url returned is the service url to the volume store.

func (*VolumeLookupCache) Export

func (v *VolumeLookupCache) Export(op trace.Operation, id, ancestor string, spec *archive.FilterSpec, data bool) (io.ReadCloser, error)

Export is a fake store export so that we can do a late lookup of the actual store - this is a work around for the fact that the store URL isn't available in useful form outside of the volumeCache

func (*VolumeLookupCache) GetVolumeStore

func (v *VolumeLookupCache) GetVolumeStore(op trace.Operation, storeName string) (*url.URL, error)

func (*VolumeLookupCache) Import

func (v *VolumeLookupCache) Import(op trace.Operation, id string, spec *archive.FilterSpec, tarStream io.ReadCloser) error

Import is a fake store import so that we can do a late lookup of the actual store - this is a work around for the fact that the store URL isn't available in useful form outside of the volumeCache

func (*VolumeLookupCache) NewDataSink

func (v *VolumeLookupCache) NewDataSink(op trace.Operation, id string) (storage.DataSink, error)

func (*VolumeLookupCache) NewDataSource

func (v *VolumeLookupCache) NewDataSource(op trace.Operation, id string) (storage.DataSource, error)

func (*VolumeLookupCache) VolumeCreate

func (v *VolumeLookupCache) VolumeCreate(op trace.Operation, ID string, store *url.URL, capacityKB uint64, info map[string][]byte) (*volume.Volume, error)

func (*VolumeLookupCache) VolumeDestroy

func (v *VolumeLookupCache) VolumeDestroy(op trace.Operation, ID string) error

func (*VolumeLookupCache) VolumeGet

func (v *VolumeLookupCache) VolumeGet(op trace.Operation, ID string) (*volume.Volume, error)

func (*VolumeLookupCache) VolumeStoresList

func (v *VolumeLookupCache) VolumeStoresList(op trace.Operation) ([]string, error)

VolumeStoresList returns a list of volume store names

func (*VolumeLookupCache) VolumesList

func (v *VolumeLookupCache) VolumesList(op trace.Operation) ([]*volume.Volume, error)

Jump to

Keyboard shortcuts

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