metrics

package
v1.2.0-alpha.1....-f276572 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 3, 2015 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

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

func (h *HeapsterMetricsClient) GetCPUUtilization(namespace string, selector map[string]string) (*int, error)

func (*HeapsterMetricsClient) GetResourceConsumptionAndRequest

func (h *HeapsterMetricsClient) GetResourceConsumptionAndRequest(resourceName api.ResourceName, namespace string, selector map[string]string) (consumption *ResourceConsumption, request *resource.Quantity, err error)

type MetricsClient

type MetricsClient interface {
	// GetCPUUtilization returns 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.
	GetCPUUtilization(namespace string, selector map[string]string) (*int, error)
}

MetricsClient is an interface for getting metrics for pods.

type ResourceConsumption

type ResourceConsumption struct {
	Resource api.ResourceName
	Quantity resource.Quantity
}

ResourceConsumption specifies consumption of a particular resource.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL