printers

package
v0.2.8 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2018 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetNewTabWriter

func GetNewTabWriter(output io.Writer) *tabwriter.Writer

GetNewTabWriter returns a tabwriter that translates tabbed columns in input into properly aligned text.

Types

type HumanReadablePrinter

type HumanReadablePrinter struct {
}

HumanReadablePrinter is an implementation of ResourcePrinter which prints resources in human readable format (tables etc.).

func NewHumanReadablePrinter

func NewHumanReadablePrinter() *HumanReadablePrinter

NewHumanReadablePrinter creates new HumanReadablePrinter

func (*HumanReadablePrinter) PrintConfig

func (p *HumanReadablePrinter) PrintConfig(config *config.Config, writer io.Writer) error

PrintConfig writes list of pods in human readable detailed format to the writer

func (*HumanReadablePrinter) PrintNode added in v0.2.8

func (p *HumanReadablePrinter) PrintNode(info *node.Info, writer io.Writer) error

PrintNode writes a node in human readable detailed format to the writer

func (*HumanReadablePrinter) PrintNodes added in v0.2.8

func (p *HumanReadablePrinter) PrintNodes(nodes []*node.Info, writer io.Writer) error

PrintNodes writes list of Nodes in human readable table format to the writer

func (*HumanReadablePrinter) PrintPod added in v0.2.4

func (p *HumanReadablePrinter) PrintPod(pod *pods.Pod, writer io.Writer) error

PrintPod writes a pod in human readable detailed format to the writer

func (*HumanReadablePrinter) PrintPods added in v0.2.4

func (p *HumanReadablePrinter) PrintPods(pods []*pods.Pod, writer io.Writer) error

PrintPods writes list of Pods in human readable table format to the writer

type ResourcePrinter

type ResourcePrinter interface {
	PrintPods([]*pods.Pod, io.Writer) error
	PrintNodes([]*node.Info, io.Writer) error
	PrintNode(*node.Info, io.Writer) error
	PrintPod(*pods.Pod, io.Writer) error
	PrintConfig(*config.Config, io.Writer) error
}

ResourcePrinter is an interface that knows how to print runtime objects.

type YamlPrinter added in v0.2.4

type YamlPrinter struct {
}

YamlPrinter is ResourcePrinter implementation which writes output in YAML format

func NewYamlPrinter added in v0.2.4

func NewYamlPrinter() *YamlPrinter

NewYamlPrinter creates new YamlPrinter instance

func (*YamlPrinter) PrintConfig added in v0.2.4

func (p *YamlPrinter) PrintConfig(config *config.Config, w io.Writer) error

PrintConfig takes Config and prints to Writer in YAML format

func (*YamlPrinter) PrintNode added in v0.2.8

func (p *YamlPrinter) PrintNode(node *node.Info, w io.Writer) error

PrintNode takes node info and prints to Writer in YAML format

func (*YamlPrinter) PrintNodes added in v0.2.8

func (p *YamlPrinter) PrintNodes(nodes []*node.Info, w io.Writer) error

PrintNodes takes list of nodes and prints to Writer in YAML format

func (*YamlPrinter) PrintPod added in v0.2.4

func (p *YamlPrinter) PrintPod(pod *pods.Pod, w io.Writer) error

PrintPod takes Pod and prints to Writer in YAML format

func (*YamlPrinter) PrintPods added in v0.2.4

func (p *YamlPrinter) PrintPods(pods []*pods.Pod, w io.Writer) error

PrintPods takes list of pods and prints to Writer in YAML format

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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