agent/ec2/ec2_metadata_client.go
func NewEC2MetadataClient(client HttpClient) EC2MetadataClient {
	if client == nil {
		return &ec2MetadataClientImpl{
			client: ec2metadata.New(
				session.New(), aws.NewConfig().WithMaxRetries(metadataRetries)),
		}
	} else {
		return &ec2MetadataClientImpl{client: client}
	}
}
func NewEC2MetadataClient(client HttpClient) EC2MetadataClient {
	if client == nil {
		return &ec2MetadataClientImpl{
			client: ec2metadata.New(
				session.New(), aws.NewConfig().WithMaxRetries(metadataRetries)),
		}
	} else {
		return &ec2MetadataClientImpl{client: client}
	}
}
// NewEC2MetadataClient creates an ec2metadata client to retrieve metadata