Documentation ¶
Index ¶
- type HeapsterMetricsClient
- func (h *HeapsterMetricsClient) GetCPUUtilization(namespace string, selector map[string]string) (*int, time.Time, error)
- func (h *HeapsterMetricsClient) GetResourceConsumptionAndRequest(resourceName api.ResourceName, namespace string, selector map[string]string) (consumption *ResourceConsumption, request *resource.Quantity, ...)
- type MetricsClient
- type ResourceConsumption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HeapsterMetricsClient ¶
type HeapsterMetricsClient struct {
// contains filtered or unexported fields
}
HeapsterMetricsClient is Heapster-based implementation of MetricsClient
func NewHeapsterMetricsClient ¶
func NewHeapsterMetricsClient(client client.Interface) *HeapsterMetricsClient
NewHeapsterMetricsClient returns a new instance of Heapster-based implementation of MetricsClient interface.
func (*HeapsterMetricsClient) GetCPUUtilization ¶ added in v1.1.1
func (*HeapsterMetricsClient) GetResourceConsumptionAndRequest ¶ added in v1.1.1
func (h *HeapsterMetricsClient) GetResourceConsumptionAndRequest(resourceName api.ResourceName, namespace string, selector map[string]string) (consumption *ResourceConsumption, request *resource.Quantity, timestamp time.Time, err error)
type MetricsClient ¶
type MetricsClient interface { // GetCPUUtilization returns the average utilization over all pods represented as a percent of requested CPU // (e.g. 70 means that an average pod uses 70% of the requested CPU) // and the time of generation of the oldest of utilization reports for pods. GetCPUUtilization(namespace string, selector map[string]string) (*int, time.Time, error) }
MetricsClient is an interface for getting metrics for pods.
type ResourceConsumption ¶ added in v1.1.1
type ResourceConsumption struct { Resource api.ResourceName Quantity resource.Quantity }
ResourceConsumption specifies consumption of a particular resource.
Click to show internal directories.
Click to hide internal directories.