Versions in this module Expand all Collapse all v1 v1.16.3 Nov 9, 2022 Changes in this version + const DefaultHeapsterNamespace + const DefaultHeapsterPort + const DefaultHeapsterScheme + const DefaultHeapsterService + func GetMetricUtilizationRatio(metrics PodMetricsInfo, targetUtilization int64) (utilizationRatio float64, currentUtilization int64) + func GetResourceUtilizationRatio(metrics PodMetricsInfo, requests map[string]int64, targetUtilization int32) (utilizationRatio float64, currentUtilization int32, rawAverageValue int64, ...) + type HeapsterMetricsClient struct + func (h *HeapsterMetricsClient) GetExternalMetric(metricName, namespace string, selector labels.Selector) ([]int64, time.Time, error) + func (h *HeapsterMetricsClient) GetObjectMetric(metricName string, namespace string, ...) (int64, time.Time, error) + func (h *HeapsterMetricsClient) GetRawMetric(metricName string, namespace string, selector labels.Selector, ...) (PodMetricsInfo, time.Time, error) + func (h *HeapsterMetricsClient) GetResourceMetric(resource v1.ResourceName, namespace string, selector labels.Selector) (PodMetricsInfo, time.Time, error) + type MetricsClient interface + GetExternalMetric func(metricName string, namespace string, selector labels.Selector) ([]int64, time.Time, error) + GetObjectMetric func(metricName string, namespace string, ...) (int64, time.Time, error) + GetRawMetric func(metricName string, namespace string, selector labels.Selector, ...) (PodMetricsInfo, time.Time, error) + GetResourceMetric func(resource v1.ResourceName, namespace string, selector labels.Selector) (PodMetricsInfo, time.Time, error) + func NewHeapsterMetricsClient(client clientset.Interface, namespace, scheme, service, port string) MetricsClient + func NewRESTMetricsClient(resourceClient resourceclient.PodMetricsesGetter, ...) MetricsClient + type PodMetric struct + Timestamp time.Time + Value int64 + Window time.Duration + type PodMetricsInfo map[string]PodMetric