Documentation
¶
Index ¶
Constants ¶
View Source
const (
// DefaultProfile is the default AWS Profile
DefaultProfile = "default"
)
Variables ¶
View Source
var ( // DefaultTags list of tags to look for DefaultTags = []string{"name", "env", "environment", "stage", "role", "build", "version"} )
Functions ¶
This section is empty.
Types ¶
type Instance ¶
type Instance struct { ID string PrivateIP string PublicIP string State string AZ string Launched time.Time Type string AMI string Tags map[string]string // contains filtered or unexported fields }
Instance holds an ec2 instance information
func NewInstance ¶
NewInstance returns a new Instance from an AWS EC2 Instance
func (*Instance) IsRunningLessThan ¶
IsRunningLessThan indicates if the instance was started less than X minutes ago
func (*Instance) IsRunningMoreThan ¶
IsRunningMoreThan indicates if the instance was started more than X minutes ago
func (*Instance) RunningDescription ¶
RunningDescription returns how old the instance is as a string eg. 1 day ago, 10 minutes ago, ...
type InstanceSort ¶
type InstanceSort []*Instance
InstanceSort implements sort.Interface
func (InstanceSort) Len ¶
func (a InstanceSort) Len() int
func (InstanceSort) Less ¶
func (a InstanceSort) Less(i, j int) bool
func (InstanceSort) Swap ¶
func (a InstanceSort) Swap(i, j int)
Click to show internal directories.
Click to hide internal directories.