"golang.org/x/crypto/ssh"
)
+// Map of available cloud drivers.
+// Clusters.*.Containers.CloudVMs.Driver configuration values
+// correspond to keys in this map.
var Drivers = map[string]cloud.Driver{
"azure": azure.Driver,
"ec2": ec2.Driver,
func (is instrumentedInstanceSet) Instances(tags cloud.InstanceTags) ([]cloud.Instance, error) {
instances, err := is.InstanceSet.Instances(tags)
is.cv.WithLabelValues("List", boolLabelValue(err != nil)).Inc()
- return instances, err
+ var instrumented []cloud.Instance
+ for _, i := range instances {
+ instrumented = append(instrumented, instrumentedInstance{i, is.cv})
+ }
+ return instrumented, err
}
type instrumentedInstance struct {