package top
import "k8s.io/kubectl/pkg/cmd/top"
Index ¶
- func NewCmdTop(f cmdutil.Factory, streams genericiooptions.IOStreams) *cobra.Command
- func NewCmdTopNode(f cmdutil.Factory, o *TopNodeOptions, streams genericiooptions.IOStreams) *cobra.Command
- func NewCmdTopPod(f cmdutil.Factory, o *TopPodOptions, streams genericiooptions.IOStreams) *cobra.Command
- func SupportedMetricsAPIVersionAvailable(discoveredAPIGroups *metav1.APIGroupList) bool
- type TopNodeOptions
- func (o *TopNodeOptions) Complete(f cmdutil.Factory, cmd *cobra.Command, args []string) error
- func (o TopNodeOptions) RunTopNode() error
- func (o *TopNodeOptions) Validate() error
- type TopPodOptions
Functions ¶
func NewCmdTop ¶
func NewCmdTopNode ¶
func NewCmdTopNode(f cmdutil.Factory, o *TopNodeOptions, streams genericiooptions.IOStreams) *cobra.Command
func NewCmdTopPod ¶
func NewCmdTopPod(f cmdutil.Factory, o *TopPodOptions, streams genericiooptions.IOStreams) *cobra.Command
func SupportedMetricsAPIVersionAvailable ¶
func SupportedMetricsAPIVersionAvailable(discoveredAPIGroups *metav1.APIGroupList) bool
Types ¶
type TopNodeOptions ¶
type TopNodeOptions struct { ResourceName string Selector string SortBy string NoHeaders bool UseProtocolBuffers bool ShowCapacity bool NodeClient corev1client.CoreV1Interface Printer *metricsutil.TopCmdPrinter DiscoveryClient discovery.DiscoveryInterface MetricsClient metricsclientset.Interface genericiooptions.IOStreams }
TopNodeOptions contains all the options for running the top-node cli command.
func (*TopNodeOptions) Complete ¶
func (TopNodeOptions) RunTopNode ¶
func (o TopNodeOptions) RunTopNode() error
func (*TopNodeOptions) Validate ¶
func (o *TopNodeOptions) Validate() error
type TopPodOptions ¶
type TopPodOptions struct { ResourceName string Namespace string LabelSelector string FieldSelector string SortBy string AllNamespaces bool PrintContainers bool NoHeaders bool UseProtocolBuffers bool Sum bool PodClient corev1client.PodsGetter Printer *metricsutil.TopCmdPrinter DiscoveryClient discovery.DiscoveryInterface MetricsClient metricsclientset.Interface genericiooptions.IOStreams }
func (*TopPodOptions) Complete ¶
func (TopPodOptions) RunTopPod ¶
func (o TopPodOptions) RunTopPod() error
func (*TopPodOptions) Validate ¶
func (o *TopPodOptions) Validate() error
Source Files ¶
top.go top_node.go top_pod.go
- Version
- v0.33.0 (latest)
- Published
- Apr 23, 2025
- Platform
- linux/amd64
- Imports
- 21 packages
- Last checked
- 1 month ago –
Tools for package owners.