Просмотр исходного кода

Merge branch 'develop' into nick/pv-right-sizing

Nick Curie 3 лет назад
Родитель
Сommit
e57fcc7d94
2 измененных файлов с 9 добавлено и 0 удалено
  1. 5 0
      pkg/kubecost/allocation.go
  2. 4 0
      pkg/kubecost/asset.go

+ 5 - 0
pkg/kubecost/allocation.go

@@ -1840,6 +1840,11 @@ func (as *AllocationSet) Resolution() time.Duration {
 	return as.Window.Duration()
 	return as.Window.Duration()
 }
 }
 
 
+// GetWindow returns the AllocationSet's window
+func (as *AllocationSet) GetWindow() Window {
+	return as.Window
+}
+
 // Set uses the given Allocation to overwrite the existing entry in the
 // Set uses the given Allocation to overwrite the existing entry in the
 // AllocationSet under the Allocation's name.
 // AllocationSet under the Allocation's name.
 func (as *AllocationSet) Set(alloc *Allocation) error {
 func (as *AllocationSet) Set(alloc *Allocation) error {

+ 4 - 0
pkg/kubecost/asset.go

@@ -3000,6 +3000,10 @@ func (as *AssetSet) Length() int {
 	return len(as.Assets)
 	return len(as.Assets)
 }
 }
 
 
+func (as *AssetSet) GetWindow() Window {
+	return as.Window
+}
+
 // Resolution returns the AssetSet's window duration
 // Resolution returns the AssetSet's window duration
 func (as *AssetSet) Resolution() time.Duration {
 func (as *AssetSet) Resolution() time.Duration {
 	return as.Window.Duration()
 	return as.Window.Duration()