Help us shape the future of Go! Take the 2026 Go Developer Survey

ec2

package
v0.2.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const ProviderName = "ec2"

Variables

View Source
var (
	ErrMissingVolumeID         = errors.New("Missing VolumeID")
	ErrMultipleVolumesReturned = errors.New("Multiple Volumes returned")
	ErrNoVolumesReturned       = errors.New("No Volumes returned")
)

Functions

func Init

func Init(conf *config.Config) (storage.Driver, error)

Types

type Driver

type Driver struct {
	InstanceDocument *instanceIdentityDocument
	EC2Instance      *ec2.EC2
	Config           *config.Config
}

func (*Driver) AttachVolume

func (driver *Driver) AttachVolume(runAsync bool, volumeID, instanceID string) ([]*storage.VolumeAttachment, error)

func (*Driver) CopySnapshot

func (driver *Driver) CopySnapshot(runAsync bool, volumeID, snapshotID, snapshotName, destinationSnapshotName, destinationRegion string) (*storage.Snapshot, error)

func (*Driver) CreateSnapshot

func (driver *Driver) CreateSnapshot(runAsync bool, snapshotName, volumeID, description string) ([]*storage.Snapshot, error)

func (*Driver) CreateVolume

func (driver *Driver) CreateVolume(runAsync bool, volumeName string, volumeID string, snapshotID string, volumeType string, IOPS int64, size int64, availabilityZone string) (*storage.Volume, error)

func (*Driver) DetachVolume

func (driver *Driver) DetachVolume(runAsync bool, volumeID string, blank string) error

func (*Driver) GetDeviceNextAvailable

func (driver *Driver) GetDeviceNextAvailable() (string, error)

func (*Driver) GetInstance

func (driver *Driver) GetInstance() (*storage.Instance, error)

func (*Driver) GetSnapshot

func (driver *Driver) GetSnapshot(volumeID, snapshotID, snapshotName string) ([]*storage.Snapshot, error)

func (*Driver) GetVolume

func (driver *Driver) GetVolume(volumeID, volumeName string) ([]*storage.Volume, error)

func (*Driver) GetVolumeAttach

func (driver *Driver) GetVolumeAttach(volumeID, instanceID string) ([]*storage.VolumeAttachment, error)

func (*Driver) GetVolumeMapping

func (driver *Driver) GetVolumeMapping() ([]*storage.BlockDevice, error)

func (*Driver) RemoveSnapshot

func (driver *Driver) RemoveSnapshot(snapshotID string) error

func (*Driver) RemoveVolume

func (driver *Driver) RemoveVolume(volumeID string) error

Jump to

Keyboard shortcuts

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