display

package
v0.6.4 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2024 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const NAME_FIELD string = "name"

TODO: would be nice to make it configurable or automatically determined

Variables

This section is empty.

Functions

func ChartsFn

func ChartsFn(cmd *cobra.Command, args []string) error

func DataProcessorStart

func DataProcessorStart(dp DataProcessor) *sync.WaitGroup

func TableFn

func TableFn(cmd *cobra.Command, args []string) error

Types

type ChartProcessor

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

func (*ChartProcessor) Layout

func (cp *ChartProcessor) Layout(data []DataPoint) error

func (*ChartProcessor) Process

func (cp *ChartProcessor) Process(data []DataPoint) error

type ChartSeries

type ChartSeries struct {
	Data      []float64
	Name      string
	Chart     *linechart.LineChart
	MaxPoints int
	Color     cell.Color
}

func NewSeries

func NewSeries(name string, maxpoints int, chart *linechart.LineChart, color cell.Color) *ChartSeries

func (*ChartSeries) AddPoint

func (c *ChartSeries) AddPoint(val float64) error

type DataPoint

type DataPoint map[string]interface{}

type DataProcessor

type DataProcessor interface {
	Layout([]DataPoint) error
	Process([]DataPoint) error
}

type TableProcessor

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

func (*TableProcessor) Format

func (tp *TableProcessor) Format() string

func (*TableProcessor) Layout

func (tp *TableProcessor) Layout(input []DataPoint) error

func (*TableProcessor) Process

func (tp *TableProcessor) Process(input []DataPoint) error

Jump to

Keyboard shortcuts

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