Versions in this module Expand all Collapse all v0 v0.2.0 Feb 16, 2022 v0.1.0 Feb 16, 2022 Changes in this version + func ExceedsCompare(a string) string + func FieldString(str string) float64 + func NodeCapacity(node *v1.Node) v1.ResourceList + func PodRequestsAndLimits(pod *v1.Pod) (reqs, limits v1.ResourceList, err error) + type CPUResources struct + CPUCapacity *CpuResource + CPULimits *CpuResource + CPULimitsFraction float64 + CPURequests *CpuResource + CPURequestsFraction float64 + CPUUsages *CpuResource + type CpuResource struct + func NewCpuResource(value int64) *CpuResource + func (r *CpuResource) String() string + func (r *CpuResource) ToQuantity() *resource.Quantity + type KubeClient struct + func NewClient(config *rest.Config) (*KubeClient, error) + func (k *KubeClient) GetActivePodByNodename(node corev1.Node) (*corev1.PodList, error) + func (k *KubeClient) GetNodeMetricsFromMetricsAPI(resourceName string, selector labels.Selector) (*metricsapi.NodeMetricsList, error) + func (k *KubeClient) GetNodeResources(resourceName string, resourceType string, sortBy string, ...) ([][]string, error) + func (k *KubeClient) GetNodes(resourceName string, selector labels.Selector) (map[string]corev1.Node, error) + func (k *KubeClient) GetPodByPodname(podName string, namespace string) (*corev1.Pod, error) + func (k *KubeClient) GetPodMetricsFromMetricsAPI(namespace, resourceName string, allNamespaces bool, ...) (*metricsapi.PodMetricsList, error) + func (k *KubeClient) GetPodResources(podmetrics []metricsapi.PodMetrics, namespace string, resourceName string, ...) ([][]string, error) + func (k *KubeClient) PodMetricses() (*metricsV1beta1api.PodMetricsList, error) + type MemoryResource struct + func NewMemoryResource(value int64) *MemoryResource + func (r *MemoryResource) String() string + func (r *MemoryResource) ToQuantity() *resource.Quantity + type MemoryResources struct + MemoryCapacity *MemoryResource + MemoryLimits *MemoryResource + MemoryLimitsFraction float64 + MemoryRequests *MemoryResource + MemoryRequestsFraction float64 + MemoryUsages *MemoryResource + type NodeAllocatedResources struct + type PodAllocatedResources struct + CPULimits *CpuResource + CPURequests *CpuResource + CPUUsages *CpuResource + CPUUsagesFraction float64 + MemoryLimits *MemoryResource + MemoryRequests *MemoryResource + MemoryUsages *MemoryResource + MemoryUsagesFraction float64 + type PodResources struct + AllocatedPods int + PodCapacity int64 + PodFraction float64