kubernetes: k8s.io/kubernetes/pkg/kubectl/metricsutil Index | Files

package metricsutil

import "k8s.io/kubernetes/pkg/kubectl/metricsutil"

Index

Package Files

metrics_client.go metrics_printer.go

Constants

const (
    DefaultHeapsterNamespace = "kube-system"
    DefaultHeapsterScheme    = "http"
    DefaultHeapsterService   = "heapster"
    DefaultHeapsterPort      = "" // use the first exposed port on the service
)

Variables

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"
)

func GetHeapsterMetrics Uses

func GetHeapsterMetrics(cli *HeapsterMetricsClient, path string, params map[string]string) ([]byte, error)

type HeapsterMetricsClient Uses

type HeapsterMetricsClient struct {
    SVCClient         corev1client.ServicesGetter
    HeapsterNamespace string
    HeapsterScheme    string
    HeapsterService   string
    HeapsterPort      string
}

func NewHeapsterMetricsClient Uses

func NewHeapsterMetricsClient(svcClient corev1client.ServicesGetter, namespace, scheme, service, port string) *HeapsterMetricsClient

func (*HeapsterMetricsClient) GetNodeMetrics Uses

func (cli *HeapsterMetricsClient) GetNodeMetrics(nodeName string, selector string) (*metricsapi.NodeMetricsList, error)

func (*HeapsterMetricsClient) GetPodMetrics Uses

func (cli *HeapsterMetricsClient) GetPodMetrics(namespace string, podName string, allNamespaces bool, selector labels.Selector) (*metricsapi.PodMetricsList, error)

type NodeMetricsSorter Uses

type NodeMetricsSorter struct {
    // contains filtered or unexported fields
}

func NewNodeMetricsSorter Uses

func NewNodeMetricsSorter(metrics []metricsapi.NodeMetrics, sortBy string) (*NodeMetricsSorter, error)

func (*NodeMetricsSorter) Len Uses

func (n *NodeMetricsSorter) Len() int

func (*NodeMetricsSorter) Less Uses

func (n *NodeMetricsSorter) Less(i, j int) bool

func (*NodeMetricsSorter) Swap Uses

func (n *NodeMetricsSorter) Swap(i, j int)

type PodMetricsSorter Uses

type PodMetricsSorter struct {
    // contains filtered or unexported fields
}

func NewPodMetricsSorter Uses

func NewPodMetricsSorter(metrics []metricsapi.PodMetrics, printContainers bool, withNamespace bool, sortBy string) (*PodMetricsSorter, error)

func (*PodMetricsSorter) Len Uses

func (p *PodMetricsSorter) Len() int

func (*PodMetricsSorter) Less Uses

func (p *PodMetricsSorter) Less(i, j int) bool

func (*PodMetricsSorter) Swap Uses

func (p *PodMetricsSorter) Swap(i, j int)

type ResourceMetricsInfo Uses

type ResourceMetricsInfo struct {
    Name      string
    Metrics   v1.ResourceList
    Available v1.ResourceList
}

type TopCmdPrinter Uses

type TopCmdPrinter struct {
    // contains filtered or unexported fields
}

func NewTopCmdPrinter Uses

func NewTopCmdPrinter(out io.Writer) *TopCmdPrinter

func (*TopCmdPrinter) PrintNodeMetrics Uses

func (printer *TopCmdPrinter) PrintNodeMetrics(metrics []metricsapi.NodeMetrics, availableResources map[string]v1.ResourceList, noHeaders bool, sortBy string) error

func (*TopCmdPrinter) PrintPodMetrics Uses

func (printer *TopCmdPrinter) PrintPodMetrics(metrics []metricsapi.PodMetrics, printContainers bool, withNamespace bool, noHeaders bool, sortBy string) error

Package metricsutil imports 16 packages (graph) and is imported by 16 packages. Updated 2019-06-24. Refresh now. Tools for package owners.