describe

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 8, 2025 License: Apache-2.0 Imports: 36 Imported by: 0

Documentation

Overview

Copyright 2024 The Kubernetes Authors.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

View Source
const (
	IndentLevelZero = iota
	IndentLevelOne
	IndentLevelTwo
	IndentLevelThree
)

Each level has 2 spaces for describehelper.PrefixWriter

Variables

This section is empty.

Functions

func NewDescribeCmd

func NewDescribeCmd(clientGetter util.ClientGetter, streams genericiooptions.IOStreams) *cobra.Command

Types

type ConfigMapDescriber

type ConfigMapDescriber struct{}

ConfigMapDescriber generates information about a configMap.

func (*ConfigMapDescriber) Describe

func (d *ConfigMapDescriber) Describe(object *unstructured.Unstructured) (string, error)

type DescribeOptions

type DescribeOptions struct {
	AllNamespaces bool
	Namespace     string
	ProfileName   string
	ModeName      string
	TaskName      string
	LabelSelector string

	UserSpecifiedTask []string

	ResourceGVK     schema.GroupVersionKind
	ResourceBuilder *resource.Builder

	Clientset kubernetes.Interface

	genericiooptions.IOStreams
	// contains filtered or unexported fields
}

func NewDescribeOptions

func NewDescribeOptions(streams genericiooptions.IOStreams) *DescribeOptions

func (*DescribeOptions) Complete

func (o *DescribeOptions) Complete(clientGetter util.ClientGetter, args []string) error

func (*DescribeOptions) Run

func (o *DescribeOptions) Run(ctx context.Context) error

type JobDescriber

type JobDescriber struct{}

JobDescriber generates information about a job and the pods it has created.

func (*JobDescriber) Describe

func (d *JobDescriber) Describe(object *unstructured.Unstructured) (string, error)

type PodDescriber

type PodDescriber struct{}

PodDescriber generates information about a pod.

func (*PodDescriber) Describe

func (d *PodDescriber) Describe(object *unstructured.Unstructured) (string, error)

type RayClusterDescriber

type RayClusterDescriber struct{}

RayClusterDescriber generates information about a ray cluster.

func (*RayClusterDescriber) Describe

func (d *RayClusterDescriber) Describe(object *unstructured.Unstructured) (string, error)

type RayJobDescriber

type RayJobDescriber struct{}

RayJobDescriber generates information about a ray job.

func (*RayJobDescriber) Describe

func (d *RayJobDescriber) Describe(object *unstructured.Unstructured) (string, error)

type ResourceDescriber

type ResourceDescriber interface {
	Describe(object *unstructured.Unstructured) (output string, err error)
}

ResourceDescriber generates output for the named resource or an error if the output could not be generated. Implementers typically abstract the retrieval of the named object from a remote server.

func DescriberFor

func DescriberFor(kind schema.GroupKind) (ResourceDescriber, bool)

DescriberFor returns the default describe functions for each of the standard Kubernetes types.

func NewResourceDescriber

func NewResourceDescriber(mapping *meta.RESTMapping) (ResourceDescriber, error)

NewResourceDescriber returns a Describer for displaying the specified RESTMapping type or an error.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳