Documentation ¶
Index ¶
- Constants
- Variables
- func FindLabel(labels map[string]string, labelName string) (string, bool)
- func FromComputeResourceToResourceList(resources v12.ComputeResource) v1.ResourceList
- func FromResourceListToComputeResource(limits v1.ResourceList) v12.ComputeResource
- func HasLabelAndValue(labels map[string]string, labelName string, value string) bool
- func ToJSONString(value interface{}) string
- type FormatDetailsLevel
- type FormatterOptions
- type NodeAndPods
Constants ¶
View Source
const ( True = "True" OneMegaByte = int64(1024 * 1024) OneMBPS = int64(1000000) ResourceGpu = "nvidia.com/gpu" ResourceNetwork = "titus/network" )
Variables ¶
View Source
var ( ComputeResourceLowCpu = v1.ComputeResource{ CPU: 1, GPU: 0, MemoryMB: 8096, DiskMB: 16384, NetworkMBPS: 256, } ComputeResourcesRegular = v1.ComputeResource{ CPU: 4, GPU: 0, MemoryMB: 8096, DiskMB: 16384, NetworkMBPS: 256, } ComputeResourcesHighCpu = v1.ComputeResource{ CPU: 20, GPU: 0, MemoryMB: 8096, DiskMB: 16384, NetworkMBPS: 256, } )
Functions ¶
func FromComputeResourceToResourceList ¶
func FromComputeResourceToResourceList(resources v12.ComputeResource) v1.ResourceList
func FromResourceListToComputeResource ¶
func FromResourceListToComputeResource(limits v1.ResourceList) v12.ComputeResource
FIXME Resources are in MB but should be in bytes
func HasLabelAndValue ¶
func ToJSONString ¶
func ToJSONString(value interface{}) string
Types ¶
type FormatDetailsLevel ¶
type FormatDetailsLevel int
const ( FormatCompact FormatDetailsLevel = 0 FormatEssentials FormatDetailsLevel = 1 FormatDetails FormatDetailsLevel = 2 )
type FormatterOptions ¶
type FormatterOptions struct {
Level FormatDetailsLevel
}
Source Files ¶
Click to show internal directories.
Click to hide internal directories.