Versions in this module Expand all Collapse all v0 v0.1.0 Jun 17, 2021 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 + type PrometheusMetricServer struct + func (metricsServer PrometheusMetricServer) NewServer(address string, pattern string) + func (metricsServer PrometheusMetricServer) RecordHPAScalerError(namespace string, scaledObject string, scaler string, scalerIndex int, ...) + func (metricsServer PrometheusMetricServer) RecordHPAScalerMetric(namespace string, scaledObject string, scaler string, scalerIndex int, ...) + func (metricsServer PrometheusMetricServer) RecordScalerObjectError(namespace string, scaledObject string, err error) + type Server interface + NewServer func(address string, pattern string) + RecordScalerError func(namespace string, scaledObject string, scaler string, scalerIndex int, ...) + RecordScalerMetric func(namespace string, scaledObject string, scaler string, scalerIndex int, ...) + RecordScalerObjectError func(namespace string, scaledObject string, err error)