Documentation ¶
Index ¶
Constants ¶
View Source
const ( DefaultHeapsterNamespace = "kube-system" DefaultHeapsterScheme = "http" DefaultHeapsterService = "heapster" DefaultHeapsterPort = "" // use the first exposed port on the service )
Variables ¶
View Source
var ( MeasuredResources = []v1.ResourceName{ v1.ResourceCPU, v1.ResourceMemory, } NodeColumns = []string{"NAME", "CPU(cores)", "CPU%", "MEMORY(bytes)", "MEMORY%"} PodColumns = []string{"NAME", "CPU(cores)", "MEMORY(bytes)"} NamespaceColumn = "NAMESPACE" PodColumn = "POD" )
Functions ¶
func GetHeapsterMetrics ¶
Types ¶
type HeapsterMetricsClient ¶
type HeapsterMetricsClient struct { SVCClient corev1client.ServicesGetter HeapsterNamespace string HeapsterScheme string HeapsterService string HeapsterPort string }
func NewHeapsterMetricsClient ¶
func NewHeapsterMetricsClient(svcClient corev1client.ServicesGetter, namespace, scheme, service, port string) *HeapsterMetricsClient
func (*HeapsterMetricsClient) GetNodeMetrics ¶
func (cli *HeapsterMetricsClient) GetNodeMetrics(nodeName string, selector string) (*metricsapi.NodeMetricsList, error)
func (*HeapsterMetricsClient) GetPodMetrics ¶
func (cli *HeapsterMetricsClient) GetPodMetrics(namespace string, podName string, allNamespaces bool, selector labels.Selector) (*metricsapi.PodMetricsList, error)
type NodeMetricsSorter ¶
type NodeMetricsSorter struct {
// contains filtered or unexported fields
}
func NewNodeMetricsSorter ¶
func NewNodeMetricsSorter(metrics []metricsapi.NodeMetrics, sortBy string) (*NodeMetricsSorter, error)
func (*NodeMetricsSorter) Len ¶
func (n *NodeMetricsSorter) Len() int
func (*NodeMetricsSorter) Less ¶
func (n *NodeMetricsSorter) Less(i, j int) bool
func (*NodeMetricsSorter) Swap ¶
func (n *NodeMetricsSorter) Swap(i, j int)
type PodMetricsSorter ¶
type PodMetricsSorter struct {
// contains filtered or unexported fields
}
func NewPodMetricsSorter ¶
func NewPodMetricsSorter(metrics []metricsapi.PodMetrics, printContainers bool, withNamespace bool, sortBy string) (*PodMetricsSorter, error)
func (*PodMetricsSorter) Len ¶
func (p *PodMetricsSorter) Len() int
func (*PodMetricsSorter) Less ¶
func (p *PodMetricsSorter) Less(i, j int) bool
func (*PodMetricsSorter) Swap ¶
func (p *PodMetricsSorter) Swap(i, j int)
type ResourceMetricsInfo ¶
type ResourceMetricsInfo struct { Name string Metrics v1.ResourceList Available v1.ResourceList }
type TopCmdPrinter ¶
type TopCmdPrinter struct {
// contains filtered or unexported fields
}
func NewTopCmdPrinter ¶
func NewTopCmdPrinter(out io.Writer) *TopCmdPrinter
func (*TopCmdPrinter) PrintNodeMetrics ¶
func (printer *TopCmdPrinter) PrintNodeMetrics(metrics []metricsapi.NodeMetrics, availableResources map[string]v1.ResourceList, noHeaders bool, sortBy string) error
func (*TopCmdPrinter) PrintPodMetrics ¶
func (printer *TopCmdPrinter) PrintPodMetrics(metrics []metricsapi.PodMetrics, printContainers bool, withNamespace bool, noHeaders bool, sortBy string) error
Click to show internal directories.
Click to hide internal directories.