Documentation
¶
Index ¶
- func BuildResourceList(resources map[v1.ResourceName]string) (v1.ResourceList, error)
- func PodKey(pod *v1.Pod) (string, error)
- func PodKeyFromNames(namespace string, name string) string
- func PodPriority(pod *v1.Pod) int32
- func PodTotalResourceRequests(pod *v1.Pod) v1.ResourceList
- func ResourceListGE(r1, r2 v1.ResourceList) bool
- func ResourceListSum(r1, r2 v1.ResourceList) v1.ResourceList
- func UpdatePodCondition(clock clock.Clock, status *v1.PodStatus, condition *v1.PodCondition) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildResourceList ¶
func BuildResourceList(resources map[v1.ResourceName]string) (v1.ResourceList, error)
BuildResourceList parses a map from resource names to quantities (in strings) to a v1.ResourceList. Returns error if failed to parse.
func PodKey ¶
PodKey builds a key for the given pod. Returns error if the pod doesn't have valid (i.e., non-empty) namespace and name.
func PodKeyFromNames ¶
PodKeyFromNames builds a key from the namespace and pod name.
func PodPriority ¶
PodPriority returns the priority of the given pod.
func PodTotalResourceRequests ¶
func PodTotalResourceRequests(pod *v1.Pod) v1.ResourceList
PodTotalResourceRequests extracts the total amount of resource requested by the given pod.
func ResourceListGE ¶
func ResourceListGE(r1, r2 v1.ResourceList) bool
ResourceListGE returns true when r1 >= r2, false otherwise.
func ResourceListSum ¶
func ResourceListSum(r1, r2 v1.ResourceList) v1.ResourceList
ResourceListSum returns the sum of two resource lists.
func UpdatePodCondition ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.