awsutil

package
v0.0.0-...-3c2c9c2 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2018 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EC2Instance

type EC2Instance struct {
	EC2Client  *ec2.EC2
	InstanceID string
	Prefix     string
	NodeID     string
	Az         string
	Region     string
	Vols       map[string][]EbsVol
	Enis       []string
}

EC2Instance is a struct containing current instance info + a connected EC2 client

func GetEC2InstanceData

func GetEC2InstanceData() EC2Instance

GetEC2InstanceData returns a populated EC2Instance struct with the current EC2 instances' metadata

func (*EC2Instance) AttachEbsVolumes

func (e *EC2Instance) AttachEbsVolumes(dryRun bool) map[string][]EbsVol

AttachEbsVolumes attaches the given map of {'VolumeName':[]EbsVol} with the EC2 client in the provided ec2Instance

func (*EC2Instance) AttachEnis

func (e *EC2Instance) AttachEnis(dryRun bool)

AttachEnis attaches the given array of Eni Ids with the EC2 client in the provided ec2Instance

func (*EC2Instance) FindEbsVolumes

func (e *EC2Instance) FindEbsVolumes()

FindEbsVolumes discovers and creates a {'VolumeName':[]EbsVol} map for all the required EBS volumes given an EC2Instance struct

func (*EC2Instance) FindEnis

func (e *EC2Instance) FindEnis()

FindEnis returns a list of all ENIs that should be attached to this EC2 instance

type EbsVol

type EbsVol struct {
	EbsVolID     string
	VolumeName   string
	RaidLevel    int
	VolumeSize   int
	AttachedName string
	MountPath    string
	FsType       string
}

EbsVol is a struct defining the discovered EBS volumes and its metadata parsed from the tags

Jump to

Keyboard shortcuts

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