func getGceInstanceID() info.InstanceID { instanceID, err := metadata.Get("instance/id") if err != nil { return info.UnknownInstance } return info.InstanceID(info.InstanceType(instanceID)) }
func getAzureInstanceID() info.InstanceID { data, err := ioutil.ReadFile(BiosUUIDFileName) if err != nil { return info.UnNamedInstance } return info.InstanceID(strings.TrimSuffix(string(data), "\n")) }
func getAwsInstanceID() info.InstanceID { return info.InstanceID(getAwsMetadata("instance-id")) }