volume

package
v0.2.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2015 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(name string, initFunc InitFunc)

Types

type Driver

type Driver interface {
	// Mount will return a mount point path when specifying either a volumeName or volumeID.  If a overwriteFs boolean
	// is specified it will overwrite the FS based on newFsType if it is detected that there is no FS present.
	Mount(volumeName, volumeID string, overwriteFs bool, newFsType string) (string, error)

	// Unmount will unmount the specified volume by volumeName or volumeID.
	Unmount(volumeName, volumeID string) error

	// Path will return the mounted path of the volumeName or volumeID.
	Path(volumeName, volumeID string) (string, error)

	// Create will create a new volume with the volumeName.
	Create(volumeName string) error

	// Remove will remove a volume of volumeName.
	Remove(volumeName string) error

	// Attach will attach a volume based on volumeName to the instance of instanceID.
	Attach(volumeName, instanceID string) (string, error)

	// Detach will detach a volume based on volumeName to the instance of instanceID.
	Detach(volumeName, instanceID string) error

	// NetworkName will return an identifier of a volume that is relevant when corelating a
	// local device to a device that is the volumeName to the local instanceID.
	NetworkName(volumeName, instanceID string) (string, error)
}

type InitFunc

type InitFunc func(
	osDriverManager *osm.OSDriverManager,
	storageDriverManager *storage.StorageDriverManager) (Driver, error)

type VolumeDriverManager

type VolumeDriverManager struct {
	Drivers map[string]Driver
}

func NewVolumeDriverManager

func NewVolumeDriverManager(
	conf *config.Config,
	osDriverManager *osm.OSDriverManager,
	storageDriverManager *storage.StorageDriverManager) (*VolumeDriverManager, error)

func (*VolumeDriverManager) Attach

func (vdm *VolumeDriverManager) Attach(volumeName, instanceID string) (string, error)

func (*VolumeDriverManager) Create

func (vdm *VolumeDriverManager) Create(volumeName string) error

func (*VolumeDriverManager) Detach

func (vdm *VolumeDriverManager) Detach(volumeName, instanceID string) error

func (*VolumeDriverManager) IsDrivers

func (vdm *VolumeDriverManager) IsDrivers() bool

func (*VolumeDriverManager) Mount

func (vdm *VolumeDriverManager) Mount(volumeName, volumeID string, overwriteFs bool, newFsType string) (string, error)

func (*VolumeDriverManager) NetworkName

func (vdm *VolumeDriverManager) NetworkName(volumeName, instanceID string) (string, error)

func (*VolumeDriverManager) Path

func (vdm *VolumeDriverManager) Path(volumeName, volumeID string) (string, error)

func (*VolumeDriverManager) Remove

func (vdm *VolumeDriverManager) Remove(volumeName string) error

func (*VolumeDriverManager) Unmount

func (vdm *VolumeDriverManager) Unmount(volumeName, volumeID string) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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