Documentation ¶
Overview ¶
Copyright Contributors to the Open Cluster Management project
Copyright Contributors to the Open Cluster Management project ¶
Copyright Contributors to the Open Cluster Management project ¶
Copyright Contributors to the Open Cluster Management project ¶
Copyright Contributors to the Open Cluster Management project
Index ¶
- Constants
- func DefaultIterFunc(key string, value interface{}) error
- func DefaultSegmenter(path string, start int) (segment string, next int)
- func GetSpinnerKlusterletStatus(kl *operatorv1.Klusterlet) string
- func GetSpinnerPodStatus(pod *corev1.Pod) string
- func NewSpinner(suffix string, interval time.Duration) *spinner.Spinner
- func NewSpinnerWithStatus(suffix string, interval time.Duration, final string, statusFunc func() string) *spinner.Spinner
- func PrintComponentsCRD(printer PrefixWriter, crdClient clientset.Interface, ...) error
- func PrintComponentsDeploy(printer PrefixWriter, deployClient kubernetes.Interface, ...) error
- func PrintOperatorCRD(printer PrefixWriter, crdClient clientset.Interface, name string) error
- func WorkDetails(keyPrefix string, work *workapiv1.ManifestWork) map[string]any
- type IterFunc
- type PrefixWriter
- type PrinterOption
- func (p *PrinterOption) AddFlag(fs *pflag.FlagSet)
- func (p *PrinterOption) Competele()
- func (p *PrinterOption) Print(stream genericiooptions.IOStreams, obj runtime.Object) error
- func (p *PrinterOption) Validate() error
- func (p *PrinterOption) WithTableConverter(f func(runtime.Object) *metav1.Table) *PrinterOption
- func (p *PrinterOption) WithTreeConverter(f func(runtime.Object, *TreePrinter) *TreePrinter) *PrinterOption
- type Segmenter
- type TreePrinter
- type Trie
- type Trier
Constants ¶
View Source
const ( LEVEL_0 = iota LEVEL_1 LEVEL_2 LEVEL_3 LEVEL_4 )
Each level has 2 spaces for PrefixWriter
Variables ¶
This section is empty.
Functions ¶
func DefaultIterFunc ¶ added in v0.4.0
func DefaultSegmenter ¶ added in v0.4.0
func GetSpinnerKlusterletStatus ¶ added in v0.7.0
func GetSpinnerKlusterletStatus(kl *operatorv1.Klusterlet) string
func GetSpinnerPodStatus ¶
func NewSpinnerWithStatus ¶
func PrintComponentsCRD ¶ added in v0.2.0
func PrintComponentsCRD(printer PrefixWriter, crdClient clientset.Interface, resource []operatorv1.RelatedResourceMeta) error
func PrintComponentsDeploy ¶ added in v0.2.0
func PrintComponentsDeploy(printer PrefixWriter, deployClient kubernetes.Interface, resource []operatorv1.RelatedResourceMeta, name string) error
func PrintOperatorCRD ¶ added in v0.4.0
func PrintOperatorCRD(printer PrefixWriter, crdClient clientset.Interface, name string) error
func WorkDetails ¶ added in v0.6.0
func WorkDetails(keyPrefix string, work *workapiv1.ManifestWork) map[string]any
Types ¶
type PrefixWriter ¶
type PrefixWriter interface { // Write writes text with the specified indentation level. Write(level int, format string, a ...interface{}) // WriteLine writes an entire line with no indentation level. WriteLine(a ...interface{}) // Flush forces indentation to be reset. Flush() }
PrefixWriter can write text at various indentation levels.
func NewPrefixWriter ¶
func NewPrefixWriter(out io.Writer) PrefixWriter
NewPrefixWriter creates a new PrefixWriter.
type PrinterOption ¶ added in v0.4.0
type PrinterOption struct { Options printers.PrintOptions Format string // contains filtered or unexported fields }
func NewPrinterOption ¶ added in v0.4.0
func NewPrinterOption(o printers.PrintOptions) *PrinterOption
func (*PrinterOption) AddFlag ¶ added in v0.4.0
func (p *PrinterOption) AddFlag(fs *pflag.FlagSet)
func (*PrinterOption) Competele ¶ added in v0.4.0
func (p *PrinterOption) Competele()
func (*PrinterOption) Print ¶ added in v0.4.0
func (p *PrinterOption) Print(stream genericiooptions.IOStreams, obj runtime.Object) error
func (*PrinterOption) Validate ¶ added in v0.4.0
func (p *PrinterOption) Validate() error
func (*PrinterOption) WithTableConverter ¶ added in v0.4.0
func (p *PrinterOption) WithTableConverter(f func(runtime.Object) *metav1.Table) *PrinterOption
func (*PrinterOption) WithTreeConverter ¶ added in v0.4.0
func (p *PrinterOption) WithTreeConverter(f func(runtime.Object, *TreePrinter) *TreePrinter) *PrinterOption
type TreePrinter ¶ added in v0.4.0
type TreePrinter struct {
// contains filtered or unexported fields
}
func NewTreePrinter ¶ added in v0.4.0
func NewTreePrinter(name string) TreePrinter
func (*TreePrinter) AddFileds ¶ added in v0.4.0
func (t *TreePrinter) AddFileds(name string, mp *map[string]interface{})
AddFileds add the fileds need to print to TreePrinter. @param name : the name of object to be print @param mp : key is a string represents level and path, value is the value will be printed.
Click to show internal directories.
Click to hide internal directories.