Documentation ¶
Index ¶
- Constants
- func VolumeJoin(op trace.Operation, handle *exec.Handle, volume *volume.Volume, ...) (*exec.Handle, error)
- type Volume
- type VolumeStore
- func (v *VolumeStore) Export(op trace.Operation, id, ancestor string, spec *archive.FilterSpec, data bool) (io.ReadCloser, error)
- func (v *VolumeStore) Import(op trace.Operation, id string, spec *archive.FilterSpec, ...) error
- func (v *VolumeStore) NewDataSink(op trace.Operation, id string) (storage.DataSink, error)
- func (v *VolumeStore) NewDataSource(op trace.Operation, id string) (storage.DataSource, error)
- func (v *VolumeStore) Owners(op trace.Operation, url *url.URL, filter func(vm *mo.VirtualMachine) bool) ([]*vm.VirtualMachine, error)
- func (v *VolumeStore) URL(op trace.Operation, id string) (*url.URL, error)
- func (v *VolumeStore) VolumeCreate(op trace.Operation, ID string, store *url.URL, capacityKB uint64, ...) (*volume.Volume, error)
- func (v *VolumeStore) VolumeDestroy(op trace.Operation, vol *volume.Volume) error
- func (v *VolumeStore) VolumesList(op trace.Operation) ([]*volume.Volume, error)
Constants ¶
const (
DefaultUID = 1000
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Volume ¶
type Volume struct { // VS Host + Path to the actual volume Host *url.URL // Path of the volume from the volumestore target Path string }
Volume identifies an NFS based volume
type VolumeStore ¶
type VolumeStore struct { // volume store name Name string // Service is the interface to the nfs target. Service nfs.MountServer // Service selflink to volume store. SelfLink *url.URL // Archiver defines WriteArchive and Export interface methods archive.Archiver }
VolumeStore this is nfs related volume store definition
func NewVolumeStore ¶
func NewVolumeStore(op trace.Operation, storeName string, mount nfs.MountServer) (*VolumeStore, error)
func (*VolumeStore) Export ¶
func (v *VolumeStore) Export(op trace.Operation, id, ancestor string, spec *archive.FilterSpec, data bool) (io.ReadCloser, error)
Export reads the delta between child and parent volume layers, returning the difference as a tar archive.
store - the volume store containing the two layers id - must inherit from ancestor if ancestor is specified ancestor - the volume layer up the chain against which to diff spec - describes filters on paths found in the data (include, exclude, strip) data - set to true to include file data in the tar archive, false to include headers only Export creates and returns a tar archive containing data found between an nfs layer one or all of its ancestors
func (*VolumeStore) Import ¶
func (v *VolumeStore) Import(op trace.Operation, id string, spec *archive.FilterSpec, tarStream io.ReadCloser) error
Import takes a tar archive stream and extracts it into the target volume
func (*VolumeStore) NewDataSink ¶
func (*VolumeStore) NewDataSource ¶
func (v *VolumeStore) NewDataSource(op trace.Operation, id string) (storage.DataSource, error)
func (*VolumeStore) Owners ¶
func (v *VolumeStore) Owners(op trace.Operation, url *url.URL, filter func(vm *mo.VirtualMachine) bool) ([]*vm.VirtualMachine, error)
func (*VolumeStore) VolumeCreate ¶
func (v *VolumeStore) VolumeCreate(op trace.Operation, ID string, store *url.URL, capacityKB uint64, info map[string][]byte) (*volume.Volume, error)
Creates a volume directory and volume object for NFS based volumes
func (*VolumeStore) VolumeDestroy ¶
VolumeDestroy Removes a volume and all of its contents from the nfs store. We already know via the cache if it is in use.