printers

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// RESET is the escape sequence for unsetting any previous commands.
	RESET = 0
	// ESC is the escape sequence used to send ANSI commands in the terminal.
	ESC          = 27
	RED    color = 31
	GREEN  color = 32
	YELLOW color = 33
)

Variables

This section is empty.

Functions

func CreatePrinter

func CreatePrinter(printerType string,
	collector *collector.ResourceStatusCollector, w io.Writer) (print.Printer,
	error)

CreatePrinter return an implementation of the Printer interface. The actual implementation is based on the printerType requested.

func NewTablePrinter

func NewTablePrinter(collector *collector.ResourceStatusCollector,
	w io.Writer) *tablePrinter

NewTablePrinter returns a new instance of the tablePrinter. The passed in collector is the source of data to be printed, and the writer is where the printer will send the output.

Types

type ColumnDef

type ColumnDef struct {
	// contains filtered or unexported fields
}

ColumnDef defines the properties of every supported column by the printer.

Jump to

Keyboard shortcuts

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