Преглед на файлове

Fix commentary on KubeModelSet example

Niko Kovacevic преди 6 месеца
родител
ревизия
1675a6f8b6
променени са 1 файла, в които са добавени 3 реда и са изтрити 2 реда
  1. 3 2
      core/pkg/model/kubemodel/example.go

+ 3 - 2
core/pkg/model/kubemodel/example.go

@@ -10,7 +10,8 @@ type ContainerCosts struct {
 }
 }
 
 
 // ApplyContainerCosts is a simplified example of a consumer of the
 // ApplyContainerCosts is a simplified example of a consumer of the
-// KubeModelSet data structure.
+// KubeModelSet data structure, which applies Node and PersistentVolume
+// pricing to container resources to assign container costs.
 func ApplyContainerCosts(kms *KubeModelSet, pm PricingModel, out chan map[string]*ContainerCosts) {
 func ApplyContainerCosts(kms *KubeModelSet, pm PricingModel, out chan map[string]*ContainerCosts) {
 	// 1. Option that uses the flat structure
 	// 1. Option that uses the flat structure
 	flatAlgorithm(kms, pm, out)
 	flatAlgorithm(kms, pm, out)
@@ -93,7 +94,7 @@ func hierarchyAlgorithm(kms *KubeModelSet, pm PricingModel, out chan map[string]
 				cc.RAMCost = container.Resources[ResourceMemory].Values[stats.Val] * nodePricing[ResourceMemory].Price
 				cc.RAMCost = container.Resources[ResourceMemory].Values[stats.Val] * nodePricing[ResourceMemory].Price
 
 
 				// O(PVC) -- going to need to use the same access pattern as the
 				// O(PVC) -- going to need to use the same access pattern as the
-				// flat data structure, anyways, unless somehow PVCs / PVs will'
+				// flat data structure, anyways, unless somehow PVCs / PVs will
 				// be nested within Containers (e.g. under VolumeMounts?)
 				// be nested within Containers (e.g. under VolumeMounts?)
 				for pvcUID, storage := range container.VolumeMounts {
 				for pvcUID, storage := range container.VolumeMounts {
 					// O(1)
 					// O(1)