agent/app/agent.go
func (agent *ecsAgent) getEC2InstanceID() string {
	instanceID, err := agent.ec2MetadataClient.InstanceID()
	if err != nil {
		seelog.Warnf(
			"Unable to access EC2 Metadata service to determine EC2 ID: %v", err)
		return ""
	}
	return instanceID
}
func (agent *ecsAgent) getEC2InstanceID() string {
	instanceID, err := agent.ec2MetadataClient.InstanceID()
	if err != nil {
		seelog.Warnf(
			"Unable to access EC2 Metadata service to determine EC2 ID: %v", err)
		return ""
	}
	return instanceID
}
func ( agent * ecsAgent ) getEC2InstanceID ( ) string { instanceID , err := agent . ec2MetadataClient . InstanceID ( ) if err != nil { seelog . Warnf ( " " , err ) return " " } return instanceID }
// getEC2InstanceID gets the EC2 instance ID from the metadata service
getEC2InstanceID gets the EC2 instance ID from the metadata service