19320: Use AWS spot price data to calculate container cost.
[arvados.git] / lib / cloud / interfaces.go
index 2d53a49c51b7130b2ea0eb3d25b633e1dfc0dbac..7f59049681bc54ef4bd600308cb298ea297f35c8 100644 (file)
@@ -102,6 +102,9 @@ type Instance interface {
        // Replace tags with the given tags
        SetTags(InstanceTags) error
 
+       // Get recent price history, if available
+       PriceHistory() []InstancePrice
+
        // Shut down the node
        Destroy() error
 }
@@ -141,6 +144,11 @@ type InstanceSet interface {
        Stop()
 }
 
+type InstancePrice struct {
+       StartTime time.Time
+       Price     float64
+}
+
 type InitCommand string
 
 // A Driver returns an InstanceSet that uses the given InstanceSetID