general

package
v0.0.0-...-9e6775c Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RenderCPUinfo

func RenderCPUinfo(ctx context.Context, dataChannel chan *general.CPULoad, refreshRate uint64) error

RenderCPUinfo displays the CPU info page

func RenderCharts

func RenderCharts(ctx context.Context, dataChannel chan general.AggregatedMetrics, refreshRate uint64) error

RenderCharts handles plotting graphs and charts for system stats in general.

Types

type CPUPage

type CPUPage struct {
	Grid        *ui.Grid
	UsrChart    *widgets.Gauge
	NiceChart   *widgets.Gauge
	SysChart    *widgets.Gauge
	IowaitChart *widgets.Gauge
	IrqChart    *widgets.Gauge
	SoftChart   *widgets.Gauge
	IdleChart   *widgets.Gauge
	StealChart  *widgets.Gauge
	CPUChart    *widgets.Table
	CPUTable    *viz.Table
}

CPUPage contains the UI widgets for the UI rendered by the grofer -c command

func NewCPUPage

func NewCPUPage(numCores int) *CPUPage

NewCPUPage is a constructor for the CPUPage type

type MainPage

type MainPage struct {
	Grid             *ui.Grid
	MemoryChart      *viz.HorizontalBarChart
	DiskChart        *viz.Table
	NetworkChart     *viz.SparklineGroup
	CPUTable         *viz.CPUTableChart
	CPUChart         *viz.LineGraph
	TemperatureTable *viz.Table
	InfoTable        *viz.Table
	BatteryGauge     *widgets.Gauge
	// contains filtered or unexported fields
}

MainPage contains the UI widgets for the UI rendered by the grofer command

func NewPage

func NewPage(numCores int) *MainPage

NewPage returns a new page initialized from the MainPage struct

func (*MainPage) ToggleCPUWidget

func (page *MainPage) ToggleCPUWidget() viz.ScrollableWidget

ToggleCPUWidget helps toggle the widget on grid used to display CPU usage

Jump to

Keyboard shortcuts

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