Documentation ¶
Overview ¶
Package resources contains utilities to get share resources quantities.
Index ¶
- Variables
- func CPU(r corev1.ResourceList) string
- func EphemeralStorage(r corev1.ResourceList) string
- func GetAcquiredTotal(ctx context.Context, cl client.Client, clusterID string) (corev1.ResourceList, error)
- func GetSharedTotal(ctx context.Context, cl client.Client, clusterID string) (corev1.ResourceList, error)
- func Memory(r corev1.ResourceList) string
- func Others(r corev1.ResourceList) map[string]string
- func Pods(r corev1.ResourceList) string
Constants ¶
This section is empty.
Variables ¶
View Source
var WellKnownResources = []string{ corev1.ResourceCPU.String(), corev1.ResourceMemory.String(), corev1.ResourceEphemeralStorage.String(), corev1.ResourcePods.String(), }
WellKnownResources contains the well known resources.
Functions ¶
func EphemeralStorage ¶
func EphemeralStorage(r corev1.ResourceList) string
EphemeralStorage returns the storage quantity as a string.
func GetAcquiredTotal ¶
func GetAcquiredTotal(ctx context.Context, cl client.Client, clusterID string) (corev1.ResourceList, error)
GetAcquiredTotal returns the total acquired resources for a given cluster.
func GetSharedTotal ¶
func GetSharedTotal(ctx context.Context, cl client.Client, clusterID string) (corev1.ResourceList, error)
GetSharedTotal returns the total shared resources for a given cluster.
func Memory ¶
func Memory(r corev1.ResourceList) string
Memory returns the memory quantity as a string.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.