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 = []api.ResourceName{ api.ResourceCPU, api.ResourceMemory, } NodeColumns = []string{"NAME", "CPU(cores)", "CPU%", "MEMORY(bytes)", "MEMORY%"} PodColumns = []string{"NAME", "CPU(cores)", "MEMORY(bytes)"} NamespaceColumn = "NAMESPACE" PodColumn = "POD" )
View Source
var (
MetricsRoot = fmt.Sprintf("%s/%s", prefix, groupVersion)
)
Functions ¶
func GetHeapsterMetrics ¶
Types ¶
type HeapsterMetricsClient ¶
type HeapsterMetricsClient struct { *client.Client HeapsterNamespace string HeapsterScheme string HeapsterService string HeapsterPort string }
func DefaultHeapsterMetricsClient ¶
func DefaultHeapsterMetricsClient(client *client.Client) *HeapsterMetricsClient
func NewHeapsterMetricsClient ¶
func NewHeapsterMetricsClient(client *client.Client, namespace, scheme, service, port string) *HeapsterMetricsClient
func (*HeapsterMetricsClient) GetNodeMetrics ¶
func (cli *HeapsterMetricsClient) GetNodeMetrics(nodeName string, selector string) ([]metrics_api.NodeMetrics, error)
func (*HeapsterMetricsClient) GetPodMetrics ¶
func (cli *HeapsterMetricsClient) GetPodMetrics(namespace string, podName string, allNamespaces bool, selector string) ([]metrics_api.PodMetrics, error)
type ResourceMetricsInfo ¶
type ResourceMetricsInfo struct { Name string Metrics api.ResourceList Available api.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 []metrics_api.NodeMetrics, availableResources map[string]api.ResourceList) error
func (*TopCmdPrinter) PrintPodMetrics ¶
func (printer *TopCmdPrinter) PrintPodMetrics(metrics []metrics_api.PodMetrics, printContainers bool, withNamespace bool) error
Click to show internal directories.
Click to hide internal directories.