ebs

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2019 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DRIVER_NAME        = "ebs"
	DRIVER_CONFIG_FILE = "ebs.cfg"

	VOLUME_CFG_PREFIX = "volume_"
	CFG_PREFIX        = DRIVER_NAME + "_"
	CFG_POSTFIX       = ".json"

	EBS_DEFAULT_VOLUME_SIZE = "ebs.defaultvolumesize"
	EBS_DEFAULT_VOLUME_TYPE = "ebs.defaultvolumetype"
	EBS_DEFAULT_VOLUME_KEY  = "ebs.defaultkmskeyid"
	EBS_DEFAULT_ENCRYPTED   = "ebs.defaultencrypted"
	EBS_FSFREEZE            = "ebs.fsfreeze"

	DEFAULT_VOLUME_SIZE = "4G"
	DEFAULT_VOLUME_TYPE = "gp2"
	DEFAULT_FSFREEZE    = "false"

	MOUNTS_DIR    = "mounts"
	MOUNT_BINARY  = "mount"
	UMOUNT_BINARY = "umount"
)
View Source
const (
	GB             = 1073741824
	RETRY_INTERVAL = 5
)

Variables

This section is empty.

Functions

func Init

func Init(root string, config map[string]string) (ConvoyDriver, error)

func NewEBSService

func NewEBSService() (*ebsService, error)

Types

type CreateEBSVolumeRequest

type CreateEBSVolumeRequest struct {
	Size       int64
	IOPS       int64
	SnapshotID string
	VolumeType string
	Tags       map[string]string
	KmsKeyID   string
	Encrypted  bool
}

type CreateSnapshotRequest

type CreateSnapshotRequest struct {
	VolumeID    string
	Description string
	Tags        map[string]string
}

type Device

type Device struct {
	Root              string
	DefaultVolumeSize int64
	DefaultVolumeType string
	DefaultKmsKeyID   string
	DefaultEncrypted  bool
	FsFreeze          string
}

func (*Device) ConfigFile

func (dev *Device) ConfigFile() (string, error)

type Driver

type Driver struct {
	Device
	// contains filtered or unexported fields
}

func (*Driver) BackupOps

func (d *Driver) BackupOps() (BackupOperations, error)

func (*Driver) CreateBackup

func (d *Driver) CreateBackup(snapshotID, volumeID, destURL, endpointURL string, opts map[string]string) (string, error)

func (*Driver) CreateSnapshot

func (d *Driver) CreateSnapshot(req Request) error

func (*Driver) CreateVolume

func (d *Driver) CreateVolume(req Request) error

func (*Driver) DeleteBackup

func (d *Driver) DeleteBackup(backupURL, endpointURL string) error

func (*Driver) DeleteSnapshot

func (d *Driver) DeleteSnapshot(req Request) error

func (*Driver) DeleteVolume

func (d *Driver) DeleteVolume(req Request) error

func (*Driver) GetBackupInfo

func (d *Driver) GetBackupInfo(backupURL, endpointURL string) (map[string]string, error)

func (*Driver) GetSnapshotInfo

func (d *Driver) GetSnapshotInfo(req Request) (map[string]string, error)

func (*Driver) GetVolumeInfo

func (d *Driver) GetVolumeInfo(id string) (map[string]string, error)

func (*Driver) Info

func (d *Driver) Info() (map[string]string, error)

func (*Driver) ListBackup

func (d *Driver) ListBackup(destURL, endpointURL string, opts map[string]string) (map[string]map[string]string, error)

func (*Driver) ListSnapshot

func (d *Driver) ListSnapshot(opts map[string]string) (map[string]map[string]string, error)

func (*Driver) ListVolume

func (d *Driver) ListVolume(opts map[string]string) (map[string]map[string]string, error)

func (*Driver) MountPoint

func (d *Driver) MountPoint(req Request) (string, error)

func (*Driver) MountVolume

func (d *Driver) MountVolume(req Request) (string, error)

func (*Driver) Name

func (d *Driver) Name() string

func (*Driver) SnapshotOps

func (d *Driver) SnapshotOps() (SnapshotOperations, error)

func (*Driver) UmountVolume

func (d *Driver) UmountVolume(req Request) error

func (*Driver) VolumeOps

func (d *Driver) VolumeOps() (VolumeOperations, error)

type Snapshot

type Snapshot struct {
	Name       string
	VolumeName string
	EBSID      string
}

type Volume

type Volume struct {
	Name       string
	EBSID      string
	Device     string
	MountPoint string
	Snapshots  map[string]Snapshot
	// contains filtered or unexported fields
}

func (*Volume) ConfigFile

func (v *Volume) ConfigFile() (string, error)

func (*Volume) GenerateDefaultMountPoint

func (v *Volume) GenerateDefaultMountPoint() string

func (*Volume) GetDevice

func (v *Volume) GetDevice() (string, error)

func (*Volume) GetMountOpts

func (v *Volume) GetMountOpts() []string

Jump to

Keyboard shortcuts

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