Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AWSStats ¶
type AWSStats struct { AmiID string `metadata:"ami-id" ` AmiLaunchIndex string `metadata:"ami-launch-index"` AmiManifestPath string `metadata:"ami-manifest-path"` Hostname string `metadata:"hostname"` InstanceAction string `metadata:"instance-action"` InstanceID string `metadata:"instance-id"` InstanceType string `metadata:"instance-type"` LocalHostname string `metadata:"local-hostname"` LocalIpv4 string `metadata:"local-ipv4"` MAC string `metadata:"mac"` Profile string `metadata:"profile"` PublicHostname string `metadata:"public-hostname"` PublicIpv4 string `metadata:"public-ipv4"` ReservationID string `metadata:"reservation-id"` SecurityGroups string `metadata:"security-groups"` Spot struct { Termination string } }
AWSStats returns the relevant AWS information about the current instance via the machine's EC2 Metadata IP interface.
type Cloud ¶
type Cloud struct { // AWS provides information about AWS EC2 metadata. // http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html AWS *AWSStats `json:",omitempty"` // DigitalOcean shows all the information related to // DigitalOcean via its metadata interface. // https://developers.digitalocean.com/documentation/metadata/ DigitalOcean *DigitalOceanStats `json:",omitempty"` }
Cloud contains the metadata provided by the cloud providers.
type DigitalOceanStats ¶
type DigitalOceanStats struct {
*metadata.Metadata
}
DigitalOceanStats returns information about DigitalOcean droplet metadata.
func NewDigitalOcean ¶
func NewDigitalOcean() *DigitalOceanStats
NewDigitalOcean returns a DigitalOceanStats object otherwise it returns nil.
Click to show internal directories.
Click to hide internal directories.