Documentation ¶
Index ¶
- Variables
- func GetAllResourceUsages(metrics *metricsutil.ResourceMetricsInfo) map[v1.ResourceName]int64
- func GetPodMetrics(m *metricsapi.PodMetrics) v1.ResourceList
- func GetSingleResourceUsage(resourceType v1.ResourceName, quantity resource.Quantity) int64
- func NewCmdExec(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command
- func NewCmdRun(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command
- type Cmd
- type KLogger
- type KubeCLI
- func (cli *KubeCLI) APIResources(streams genericclioptions.IOStreams, args ...string) *Cmd
- func (cli *KubeCLI) ClusterInfo() (string, error)
- func (cli *KubeCLI) CurrentContext() string
- func (cli *KubeCLI) Describe(streams genericclioptions.IOStreams, args ...string) *Cmd
- func (cli *KubeCLI) Edit(streams genericclioptions.IOStreams, args ...string) *Cmd
- func (cli *KubeCLI) Exec(streams genericclioptions.IOStreams, args ...string) *Cmd
- func (cli *KubeCLI) Get(streams genericclioptions.IOStreams, args ...string) *Cmd
- func (cli *KubeCLI) GetNamespaces(ctx context.Context, opts metav1.ListOptions) (*v1.NamespaceList, error)
- func (cli *KubeCLI) GetPodMetrics(namespace, name string, allNamespaces bool, selector Selector) ([]map[v1.ResourceName]int64, error)
- func (cli *KubeCLI) GetPodRawMetrics(namespace, name string, allNamespaces bool, selector Selector) (*metricsapi.PodMetricsList, error)
- func (cli *KubeCLI) GetResourceGroupVersionKind(resourceOrKindArg string) schema.GroupVersionKind
- func (cli *KubeCLI) HasNamespacePermission(ctx context.Context) bool
- func (cli *KubeCLI) ListContexts() []string
- func (cli *KubeCLI) Logs(streams genericclioptions.IOStreams, args ...string) *Cmd
- func (cli *KubeCLI) Namespace() string
- func (cli *KubeCLI) RolloutRestart(streams genericclioptions.IOStreams, args ...string) *Cmd
- func (cli *KubeCLI) Run(streams genericclioptions.IOStreams, args ...string) *Cmd
- func (cli *KubeCLI) SetCurrentContext(context string)
- func (cli *KubeCLI) SetNamespace(namespace string)
- func (cli *KubeCLI) TopNode(streams genericclioptions.IOStreams, o *top.TopNodeOptions, args ...string) *Cmd
- func (cli *KubeCLI) TopPod(streams genericclioptions.IOStreams, o *top.TopPodOptions, args ...string) *Cmd
- func (cli *KubeCLI) WithNamespace(namespace string) *KubeCLI
- type RunObject
- type RunOptions
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrPodCompleted = fmt.Errorf("pod ran to completion")
ErrPodCompleted is returned by PodRunning or PodContainerRunning to indicate that the pod has already reached completed state.
Functions ¶
func GetAllResourceUsages ¶
func GetAllResourceUsages(metrics *metricsutil.ResourceMetricsInfo) map[v1.ResourceName]int64
func GetPodMetrics ¶
func GetPodMetrics(m *metricsapi.PodMetrics) v1.ResourceList
func GetSingleResourceUsage ¶
func GetSingleResourceUsage(resourceType v1.ResourceName, quantity resource.Quantity) int64
func NewCmdExec ¶ added in v0.7.0
Types ¶
type Cmd ¶
type Cmd struct {
// contains filtered or unexported fields
}
type KLogger ¶ added in v0.7.0
type KLogger struct {
// contains filtered or unexported fields
}
func NewKLogger ¶ added in v0.7.0
func (KLogger) WithValues ¶ added in v0.7.0
type KubeCLI ¶
type KubeCLI struct {
// contains filtered or unexported fields
}
var Cli *KubeCLI
func NewKubeCLI ¶
func NewKubeCLI() *KubeCLI
func (*KubeCLI) APIResources ¶ added in v0.4.1
func (cli *KubeCLI) APIResources(streams genericclioptions.IOStreams, args ...string) *Cmd
func (*KubeCLI) ClusterInfo ¶
func (*KubeCLI) CurrentContext ¶
func (*KubeCLI) Describe ¶
func (cli *KubeCLI) Describe(streams genericclioptions.IOStreams, args ...string) *Cmd
func (*KubeCLI) Edit ¶ added in v0.3.0
func (cli *KubeCLI) Edit(streams genericclioptions.IOStreams, args ...string) *Cmd
func (*KubeCLI) Exec ¶ added in v0.7.0
func (cli *KubeCLI) Exec(streams genericclioptions.IOStreams, args ...string) *Cmd
Exec Exec
func (*KubeCLI) Get ¶
func (cli *KubeCLI) Get(streams genericclioptions.IOStreams, args ...string) *Cmd
func (*KubeCLI) GetNamespaces ¶ added in v0.10.2
func (cli *KubeCLI) GetNamespaces(ctx context.Context, opts metav1.ListOptions) (*v1.NamespaceList, error)
func (*KubeCLI) GetPodMetrics ¶
func (*KubeCLI) GetPodRawMetrics ¶
func (cli *KubeCLI) GetPodRawMetrics( namespace, name string, allNamespaces bool, selector Selector, ) (*metricsapi.PodMetricsList, error)
func (*KubeCLI) GetResourceGroupVersionKind ¶ added in v0.5.0
func (cli *KubeCLI) GetResourceGroupVersionKind(resourceOrKindArg string) schema.GroupVersionKind
func (*KubeCLI) HasNamespacePermission ¶ added in v0.10.2
func (*KubeCLI) ListContexts ¶ added in v0.8.0
func (*KubeCLI) Logs ¶
func (cli *KubeCLI) Logs(streams genericclioptions.IOStreams, args ...string) *Cmd
func (*KubeCLI) RolloutRestart ¶ added in v0.4.0
func (cli *KubeCLI) RolloutRestart(streams genericclioptions.IOStreams, args ...string) *Cmd
func (*KubeCLI) Run ¶ added in v0.8.0
func (cli *KubeCLI) Run(streams genericclioptions.IOStreams, args ...string) *Cmd
func (*KubeCLI) SetCurrentContext ¶ added in v0.8.0
func (*KubeCLI) SetNamespace ¶
func (*KubeCLI) TopNode ¶
func (cli *KubeCLI) TopNode(streams genericclioptions.IOStreams, o *top.TopNodeOptions, args ...string) *Cmd
func (*KubeCLI) TopPod ¶
func (cli *KubeCLI) TopPod(streams genericclioptions.IOStreams, o *top.TopPodOptions, args ...string) *Cmd
func (*KubeCLI) WithNamespace ¶
type RunObject ¶ added in v0.8.0
type RunObject struct { Object runtime.Object Mapping *meta.RESTMapping }
type RunOptions ¶ added in v0.8.0
type RunOptions struct { PrintFlags *genericclioptions.PrintFlags RecordFlags *genericclioptions.RecordFlags DeleteFlags *delete.DeleteFlags DeleteOptions *delete.DeleteOptions DryRunStrategy cmdutil.DryRunStrategy DryRunVerifier *resource.DryRunVerifier PrintObj func(runtime.Object) error Recorder genericclioptions.Recorder ArgsLenAtDash int Attach bool Expose bool Generator string Image string Interactive bool LeaveStdinOpen bool Port string Privileged bool Quiet bool Schedule string TTY bool Namespace string EnforceNamespace bool genericclioptions.IOStreams // contains filtered or unexported fields }
func NewRunOptions ¶ added in v0.8.0
func NewRunOptions(streams genericclioptions.IOStreams) *RunOptions
Source Files ¶
Click to show internal directories.
Click to hide internal directories.