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) PrintDeviceDetails(info *device.Info, writer io.Writer) error
- func (p *HumanReadablePrinter) PrintDevicesTable(devices []model.DeviceInfo, writer io.Writer) error
- func (p *HumanReadablePrinter) PrintPodDetails(pod *pods.Pod, writer io.Writer) error
- func (p *HumanReadablePrinter) PrintPodsTable(pods []*pods.Pod, writer io.Writer) error
- type ResourcePrinter
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) PrintDeviceDetails ¶ added in v0.2.3
PrintDeviceDetails writes a dvice in human readable detailed format to the writer
func (*HumanReadablePrinter) PrintDevicesTable ¶
func (p *HumanReadablePrinter) PrintDevicesTable(devices []model.DeviceInfo, writer io.Writer) error
PrintDevicesTable writes stream of Devices in human readable table format to the writer
func (*HumanReadablePrinter) PrintPodDetails ¶
PrintPodDetails writes a pod in human readable detailed format to the writer
func (*HumanReadablePrinter) PrintPodsTable ¶
PrintPodsTable writes list of Pods in human readable table format to the writer
type ResourcePrinter ¶
type ResourcePrinter interface {
// PrintPodsTable receives a list of Pods, formats it as table and prints it to a writer.
PrintPodsTable([]*pods.Pod, io.Writer) error
// PrintDevicesTable receives a channel of Devices, formats the output as table
PrintDevicesTable([]model.DeviceInfo, io.Writer) error
// PrintDeviceDetails receives a Device, formats it to detailed description and prints it to the writer.
PrintDeviceDetails(*device.Info, io.Writer) error
// PrintPodDetails receives a Pod, formats it to detailed description and prints it to the writer.
PrintPodDetails(*pods.Pod, io.Writer) error
// PrintConfig receives config and formats it to human readable format
PrintConfig(*config.Config, io.Writer) error
}
ResourcePrinter is an interface that knows how to print runtime objects.