writer

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 25, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SortRows

func SortRows(res []AggregateResourceRow)

func Write

func Write(response map[string]*model.PodResource, args *model.Args) error

Types

type AggregateResourceRow

type AggregateResourceRow struct {
	Name      string
	Namespace string
	Node      string
	Container string
	Cpu       []model.Resource
	Memory    []model.Resource
}

func AggregateRows

func AggregateRows(rows []ResourceRow, aggregation model.Aggregation) []AggregateResourceRow

func (*AggregateResourceRow) Add

func (*AggregateResourceRow) TotalCpu

func (a *AggregateResourceRow) TotalCpu() model.Resource

func (*AggregateResourceRow) TotalMemory

func (a *AggregateResourceRow) TotalMemory() model.Resource

type ColoredTableWriter

type ColoredTableWriter struct {
	Writer io.Writer
	Header bool
	Footer bool
	Args   *model.Args
}

func (ColoredTableWriter) WriteRows

func (c ColoredTableWriter) WriteRows(allRows []ResourceRow)

type ResourceRow

type ResourceRow struct {
	Name      string
	Namespace string
	Node      string
	Container string
	Cpu       model.Resource
	Memory    model.Resource
}

func PodToRows

func PodToRows(pod *model.PodResource) []ResourceRow

type StyleFunc

type StyleFunc func(arg interface{}) aurora.Value

Jump to

Keyboard shortcuts

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