printer

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Copyright Contributors to the Open Cluster Management project

Copyright Contributors to the Open Cluster Management project

Index

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 GetSpinnerPodStatus

func GetSpinnerPodStatus(pod *corev1.Pod) string

func NewSpinner

func NewSpinner(suffix string, interval time.Duration) *spinner.Spinner

func NewSpinnerWithStatus

func NewSpinnerWithStatus(suffix string, interval time.Duration, final string, statusFunc func() string) *spinner.Spinner

func PrintWorkDetail

func PrintWorkDetail(n gotree.Tree, work *workapiv1.ManifestWork)

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL