Documentation
¶
Index ¶
- func GetNewTabWriter(output io.Writer) *tabwriter.Writer
- type HumanReadablePrinter
- func (p *HumanReadablePrinter) PrintConfig(config *config.Config, writer io.Writer) error
- func (p *HumanReadablePrinter) PrintDevice(info *device.Info, writer io.Writer) error
- func (p *HumanReadablePrinter) PrintDevices(devices []*device.Info, writer io.Writer) error
- func (p *HumanReadablePrinter) PrintPod(pod *pods.Pod, writer io.Writer) error
- func (p *HumanReadablePrinter) PrintPods(pods []*pods.Pod, writer io.Writer) error
- type ResourcePrinter
- type YamlPrinter
- func (p *YamlPrinter) PrintConfig(config *config.Config, w io.Writer) error
- func (p *YamlPrinter) PrintDevice(device *device.Info, w io.Writer) error
- func (p *YamlPrinter) PrintDevices(devices []*device.Info, w io.Writer) error
- func (p *YamlPrinter) PrintPod(pod *pods.Pod, w io.Writer) error
- func (p *YamlPrinter) PrintPods(pods []*pods.Pod, w io.Writer) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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 ¶
PrintConfig writes list of pods in human readable detailed format to the writer
func (*HumanReadablePrinter) PrintDevice ¶ added in v0.2.4
PrintDevice writes a device in human readable detailed format to the writer
func (*HumanReadablePrinter) PrintDevices ¶ added in v0.2.4
PrintDevices writes list of Devices in human readable table format to the writer
type ResourcePrinter ¶
type ResourcePrinter interface {
PrintPods([]*pods.Pod, io.Writer) error
PrintDevices([]*device.Info, io.Writer) error
PrintDevice(*device.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
PrintConfig takes Config and prints to Writer in YAML format
func (*YamlPrinter) PrintDevice ¶ added in v0.2.4
PrintDevice takes device info and prints to Writer in YAML format
func (*YamlPrinter) PrintDevices ¶ added in v0.2.4
PrintDevices takes list of devices and prints to Writer in YAML format