exsmount

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2019 License: MIT Imports: 19 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MountedError = errors.New("drive is already mounted")

Functions

func Create

func Create(svc *ec2.EC2, iid *IID, size int64, typ string, iops int64, is ...int) (*ec2.Volume, error)

func CreateAttach

func CreateAttach(cli *Args) ([]string, error)

func DeleteOnTermination

func DeleteOnTermination(svc *ec2.EC2, instanceId string, volumeId string, attachDevice string) error

func EFSMain

func EFSMain()

EFSMain mounts and EFS drive

func EFSMount

func EFSMount(efs string, mountPoint string, mountOpts string) error

EFSMount will mount the EFS drive to the requested mount-point. the efs argument looks like: fs-XXXXXX.efs.us-east-1.amazonaws.com:/mnt/efs/

func LocalMain

func LocalMain()

func Main

func Main()

func MountLocal

func MountLocal(deviceCandidates []string, mountBase string) ([]string, error)

MountLocal RAID-0's all devices onto a single mount-point.

func WaitForVolumeStatus

func WaitForVolumeStatus(svc *ec2.EC2, volumeId *string, status string) error

Types

type Args

type Args struct {
	Size       int64  `arg:"-s,help:size in GB of desired EBS volume"`
	MountPoint string `arg:"-m,required,help:directory on which to mount the EBS volume"`
	VolumeType string `` /* 184-byte string literal not displayed */
	FSType     string `arg:"-t,help:file system type to create (argument must be accepted by mkfs)"`
	Iops       int64  `arg:"-i,help:Provisioned IOPS. Only valid for volume type io1. Range is 100 to 20000 and <= 50*size of volume."`
	N          int    `` /* 171-byte string literal not displayed */
	Keep       bool   `arg:"-k,help:dont delete the volume(s) on termination (default is to delete)"`
}

func (Args) Version

func (a Args) Version() string

type EFSArgs

type EFSArgs struct {
	MountOptions string `arg:"-o,help:options to send to mount command"`
	EFS          string `arg:"positional,required,help:efs DNS and mount path (e.g.fs-XXXXXX.efs.us-east-1.amazonaws.com:/mnt/efs/)"`
	MountPoint   string `arg:"positional,required,help:local directory on which to mount the EBS volume"`
}

type IID

type IID struct {
	AvailabilityZone string `json:"availabilityZone"`
	InstanceId       string `json:"instanceId"`
	InstanceType     string `json:"instanceType"`
	ImageId          string `json:"imageId"`
	Region           string `json:"region"`
}

IID holds the attributes from the instance identity document

func (*IID) Get

func (i *IID) Get() error

type LocalArgs

type LocalArgs struct {
	MountPrefix string   `arg:"positional,required,help:local path to mount devices."`
	Devices     []string `arg:"positional,help:devices to mount. e.g. (/dev/xvd*). Devices that are already mounted will be skipped."`
}

func (LocalArgs) Description

func (l LocalArgs) Description() string

func (LocalArgs) Version

func (l LocalArgs) Version() string

Jump to

Keyboard shortcuts

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