Documentation ¶
Overview ¶
Package ec2dynamicdata gets ec2 dynamic data or meta data for the current running ec2 host
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // DialTimeout holds timeout value for ec2 dynamic data calls DialTimeout = time.Second * 5 )
Functions ¶
func GetMetadata ¶
GetMetadata returns the value for the given meta data item.
Types ¶
type Data ¶
type Data struct { InstanceID string `json:"instanceId"` BillingProducts interface{} `json:"billingProducts"` ImageID string `json:"imageId"` Architecture string `json:"architecture"` PendingTime time.Time `json:"pendingTime"` InstanceType string `json:"instanceType"` AccountID string `json:"accountId"` KernelID interface{} `json:"kernelId"` RamdiskID interface{} `json:"ramdiskId"` Region string `json:"region"` Version string `json:"version"` AvailabilityZone string `json:"availabilityZone"` PrivateID string `json:"privateIp"` DevpayProductCodes interface{} `json:"devpayProductCodes"` }
Data holds dynamic data about current ec2 host
type Item ¶
type Item int
Item defines a single resource that can be retrieved from a met-data endpoint
const ( AmiId Item = iota + 1 AmiLaunchIndex AmiManifestPath Hostname InstanceAction InstanceId InstanceType LocalHostname LocalIPv4 Mac Profile PublicIPv4 PublicHostname ReservationId SecurityGroups )
This is an incomplete list because other items have sub items. So if you need them just modify the source to have a support to it. But probably it's an overkill and you'll not going to need it :)
Click to show internal directories.
Click to hide internal directories.