Documentation ¶
Index ¶
Constants ¶
View Source
const ( // The nature of the beast in this code is we got a lot of magic strings SizeXSmall string = "x-small" SizeSmall string = "small" SizeMedium string = "medium" SizeLarge string = "large" SizeXLarge string = "x-large" // We need to define default sizes because if a ClowdApp doesn't provide // volume or ram/cpu capacities we just get an empty string, so we need // defaults to plug in there DefaultSizeVol string = SizeXSmall DefaultSizeCPURAM string = SizeSmall )
Variables ¶
View Source
var CPUSizeToCapacity = map[string]string{ SizeSmall: "600m", SizeMedium: "1200m", SizeLarge: "1800m", SizeXLarge: "2400m", }
Get a map of CPU T-Shirt sizes to capacities
View Source
var LimitSizeToRequestSize = map[string]string{ SizeXSmall: SizeSmall, SizeSmall: SizeMedium, SizeMedium: SizeLarge, SizeLarge: SizeXLarge, }
For any given size get the next size up Allows for size to limit mapping without conditionality
View Source
var RAMSizeToCapacity = map[string]string{ SizeSmall: "512Mi", SizeMedium: "1Gi", SizeLarge: "2Gi", SizeXLarge: "3Gi", }
Get a map of RAM T-Shirt sizes to capacities
View Source
var SizeIndex = map[string]int{ SizeXSmall: 0, SizeSmall: 1, SizeMedium: 2, SizeLarge: 3, SizeXLarge: 4, }
This is used for performing size comparisons
View Source
var VolSizeToCapacity = map[string]string{ SizeXSmall: "1Gi", SizeSmall: "2Gi", SizeMedium: "3Gi", SizeLarge: "5Gi", }
Get a map of volume T-Shirt size to capacities
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.