Documentation ¶
Index ¶
- Constants
- type HeapsterMetricsClient
- 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
- type PodMetric
- type PodMetricsInfo
Constants ¶
View Source
const ( DefaultHeapsterNamespace = "kube-system" DefaultHeapsterScheme = "http" DefaultHeapsterService = "heapster" DefaultHeapsterPort = "" // use the first exposed port on the service )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HeapsterMetricsClient ¶
type HeapsterMetricsClient struct {
// contains filtered or unexported fields
}
func (*HeapsterMetricsClient) GetExternalMetric ¶
func (*HeapsterMetricsClient) GetObjectMetric ¶
func (h *HeapsterMetricsClient) GetObjectMetric(metricName string, namespace string, objectRef *autoscaling.CrossVersionObjectReference, metricSelector labels.Selector) (int64, time.Time, error)
func (*HeapsterMetricsClient) GetRawMetric ¶
func (*HeapsterMetricsClient) GetResourceMetric ¶
func (h *HeapsterMetricsClient) GetResourceMetric(resource v1.ResourceName, namespace string, selector labels.Selector, container string) (PodMetricsInfo, time.Time, error)
type MetricsClient ¶
type MetricsClient interface { // GetResourceMetric gets the given resource metric (and an associated oldest timestamp) // for the specified named container in all pods matching the specified selector in the given namespace and when // the container is an empty string it returns the sum of all the container metrics. GetResourceMetric(resource v1.ResourceName, namespace string, selector labels.Selector, container string) (PodMetricsInfo, time.Time, error) // GetRawMetric gets the given metric (and an associated oldest timestamp) // for all pods matching the specified selector in the given namespace GetRawMetric(metricName string, namespace string, selector labels.Selector, metricSelector labels.Selector) (PodMetricsInfo, time.Time, error) // GetObjectMetric gets the given metric (and an associated timestamp) for the given // object in the given namespace GetObjectMetric(metricName string, namespace string, objectRef *autoscaling.CrossVersionObjectReference, metricSelector labels.Selector) (int64, time.Time, error) // GetExternalMetric gets all the values of a given external metric // that match the specified selector. GetExternalMetric(metricName string, namespace string, selector labels.Selector) ([]int64, time.Time, error) }
MetricsClient knows how to query a remote interface to retrieve container-level resource metrics as well as pod-level arbitrary metrics
func NewHeapsterMetricsClient ¶
func NewHeapsterMetricsClient(client clientset.Interface, namespace, scheme, service, port string) MetricsClient
func NewRESTMetricsClient ¶
func NewRESTMetricsClient(resourceClient resourceclient.PodMetricsesGetter, customClient customclient.CustomMetricsClient, externalClient externalclient.ExternalMetricsClient) MetricsClient
type PodMetric ¶
PodMetric contains pod metric value (the metric values are expected to be the metric as a milli-value)
type PodMetricsInfo ¶
PodMetricsInfo contains pod metrics as a map from pod names to PodMetricsInfo
Click to show internal directories.
Click to hide internal directories.