Documentation
¶
Index ¶
- Variables
- func GetDriverNames() []string
- func Register(name string, initFunc InitFunc)
- type BlockDevice
- type Driver
- type InitFunc
- type Instance
- type Snapshot
- type StorageDriverManager
- func (sdm *StorageDriverManager) AttachVolume(runAsync bool, volumeID string, instanceID string) ([]*VolumeAttachment, error)
- func (sdm *StorageDriverManager) CopySnapshot(runAsync bool, ...) (*Snapshot, error)
- func (sdm *StorageDriverManager) CreateSnapshot(runAsync bool, snapshotName, volumeID, description string) ([]*Snapshot, error)
- func (sdm *StorageDriverManager) CreateVolume(runAsync bool, volumeName string, volumeID, snapshotID string, ...) (*Volume, error)
- func (sdm *StorageDriverManager) DetachVolume(runAsync bool, volumeID string, instanceID string) error
- func (sdm *StorageDriverManager) GetDriverNames() []string
- func (sdm *StorageDriverManager) GetInstance() ([]*Instance, error)
- func (sdm *StorageDriverManager) GetSnapshot(volumeID, snapshotID, snapshotName string) ([]*Snapshot, error)
- func (sdm *StorageDriverManager) GetVolume(volumeID, volumeName string) ([]*Volume, error)
- func (sdm *StorageDriverManager) GetVolumeAttach(volumeID string, instanceID string) ([]*VolumeAttachment, error)
- func (sdm *StorageDriverManager) GetVolumeMapping() ([]*BlockDevice, error)
- func (sdm *StorageDriverManager) IsDrivers() bool
- func (sdm *StorageDriverManager) RemoveSnapshot(snapshotID string) error
- func (sdm *StorageDriverManager) RemoveVolume(volumeID string) error
- type Volume
- type VolumeAttachment
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrDriverBlockDeviceDiscovery = errors.New("Driver Block Device discovery failed") ErrDriverInstanceDiscovery = errors.New("Driver Instance discovery failed") ErrDriverVolumeDiscovery = errors.New("Driver Volume discovery failed") ErrDriverSnapshotDiscovery = errors.New("Driver Snapshot discovery failed") ErrMultipleDriversDetected = errors.New("Multiple drivers detected, must declare with driver with env of REXRAY_STORAGEDRIVER=") )
Functions ¶
func GetDriverNames ¶
func GetDriverNames() []string
Types ¶
type BlockDevice ¶
type Driver ¶
type Driver interface {
// GetVolumeMapping lists the block devices that are attached to the instance.
GetVolumeMapping() ([]*BlockDevice, error)
// GetInstance retrieves the local instance.
GetInstance() (*Instance, error)
// GetVolume returns all volumes for the instance based on either volumeID or volumeName
// that are available to the instance.
GetVolume(volumeID, volumeName string) ([]*Volume, error)
// GetVolumeAttach returns the attachment details based on volumeID or volumeName
// where the volume is currently attached.
GetVolumeAttach(volumeID, instanceID string) ([]*VolumeAttachment, error)
// CreateSnapshot is a synch/async operation that returns snapshots that have been
// performed based on supplying a snapshotName, source volumeID, and optional description.
CreateSnapshot(runAsync bool, snapshotName, volumeID, description string) ([]*Snapshot, error)
// GetSnapshot returns a list of snapshots for a volume based on volumeID, snapshotID, or snapshotName.
GetSnapshot(volumeID, snapshotID, snapshotName string) ([]*Snapshot, error)
// RemoveSnapshot will remove a snapshot based on the snapshotID.
RemoveSnapshot(snapshotID string) error
// CreateVolume is sync/async and will create an return a new/existing Volume based on volumeID/snapshotID with
// a name of volumeName and a size in GB. Optionally based on the storage driver, a volumeType, IOPS, and availabilityZone
// could be defined.
CreateVolume(runAsync bool, volumeName string, volumeID string, snapshotID string, volumeType string, IOPS int64, size int64, availabilityZone string) (*Volume, error)
// RemoveVolume will remove a volume based on volumeID.
RemoveVolume(volumeID string) error
// GetDeviceNextAvailable return a device path that will retrieve the next available disk device that can be used.
GetDeviceNextAvailable() (string, error)
// AttachVolume returns a list of VolumeAttachments is sync/async that will attach a volume to an instance based on volumeID and instanceID.
AttachVolume(runAsync bool, volumeID, instanceID string) ([]*VolumeAttachment, error)
// DetachVolume is sync/async that will detach the volumeID from the local instance or the instanceID.
DetachVolume(runAsync bool, volumeID string, instanceID string) error
// CopySnapshot is a sync/async and returns a snapshot that will copy a snapshot based on volumeID/snapshotID/snapshotName and
// create a new snapshot of desinationSnapshotName in the destinationRegion location.
CopySnapshot(runAsync bool, volumeID, snapshotID, snapshotName, destinationSnapshotName, destinationRegion string) (*Snapshot, error)
}
type StorageDriverManager ¶
func NewStorageDriverManager ¶
func NewStorageDriverManager(conf *config.Config) (*StorageDriverManager, error)
func (*StorageDriverManager) AttachVolume ¶
func (sdm *StorageDriverManager) AttachVolume(runAsync bool, volumeID string, instanceID string) ([]*VolumeAttachment, error)
func (*StorageDriverManager) CopySnapshot ¶
func (sdm *StorageDriverManager) CopySnapshot(runAsync bool, volumeID, snapshotID, snapshotName, targetSnapshotName, targetRegion string) (*Snapshot, error)
func (*StorageDriverManager) CreateSnapshot ¶
func (sdm *StorageDriverManager) CreateSnapshot(runAsync bool, snapshotName, volumeID, description string) ([]*Snapshot, error)
func (*StorageDriverManager) CreateVolume ¶
func (*StorageDriverManager) DetachVolume ¶
func (sdm *StorageDriverManager) DetachVolume(runAsync bool, volumeID string, instanceID string) error
func (*StorageDriverManager) GetDriverNames ¶
func (sdm *StorageDriverManager) GetDriverNames() []string
func (*StorageDriverManager) GetInstance ¶
func (sdm *StorageDriverManager) GetInstance() ([]*Instance, error)
func (*StorageDriverManager) GetSnapshot ¶
func (sdm *StorageDriverManager) GetSnapshot(volumeID, snapshotID, snapshotName string) ([]*Snapshot, error)
func (*StorageDriverManager) GetVolume ¶
func (sdm *StorageDriverManager) GetVolume(volumeID, volumeName string) ([]*Volume, error)
func (*StorageDriverManager) GetVolumeAttach ¶
func (sdm *StorageDriverManager) GetVolumeAttach(volumeID string, instanceID string) ([]*VolumeAttachment, error)
func (*StorageDriverManager) GetVolumeMapping ¶
func (sdm *StorageDriverManager) GetVolumeMapping() ([]*BlockDevice, error)
GetVolumeMapping performs storage introspection and returns a listing of block devices from the guest
func (*StorageDriverManager) IsDrivers ¶
func (sdm *StorageDriverManager) IsDrivers() bool
func (*StorageDriverManager) RemoveSnapshot ¶
func (sdm *StorageDriverManager) RemoveSnapshot(snapshotID string) error
func (*StorageDriverManager) RemoveVolume ¶
func (sdm *StorageDriverManager) RemoveVolume(volumeID string) error
Click to show internal directories.
Click to hide internal directories.