Documentation ¶
Index ¶
- func CPUProgressBar(percentage float64) string
- func ChangeProcessToTableFormat(p Process) []string
- func ConvertBits(bits uint64) float64
- func ConvertTime(uptime uint64) string
- func GetTerminalHeight() int
- func GetTerminalWidth() int
- type BasicInfo
- type MemoryData
- type Process
- type RenderTab
- type SwapData
- type View
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CPUProgressBar ¶
CPUProgressBar returns a simple progress bar used with displaying cpu percentages
func ChangeProcessToTableFormat ¶
ChangeProcessToTableFormat returns all the process fields in an array of string
func ConvertBits ¶
ConvertBits converts an amount of bits to gigabytes
func ConvertTime ¶
ConvertTime is used to convert uptime seconds to minutes and hours
func GetTerminalHeight ¶
func GetTerminalHeight() int
GetTerminalHeight returns the height of the terminal
func GetTerminalWidth ¶
func GetTerminalWidth() int
GetTerminalWidth gets the terminals width so that we can adjust the ui elements accordingly
Types ¶
type BasicInfo ¶
type BasicInfo struct { CorePercentages []float64 MemoryUsed uint64 TotalMemory uint64 MemoryUsedPercent float64 Hostname string Uptime uint64 KernelVersion string Procs uint64 Processes [][]string OS string Platform string Swap SwapData Memory MemoryData }
BasicInfo has all the the values in the upper box
type MemoryData ¶
MemoryData model holds all memory related information
func LoadMemoryData ¶
func LoadMemoryData() (MemoryData, error)
LoadMemoryData loads data related to virtual memory
type Process ¶
Process includes all the types for the table view
func LoadAllProcesses ¶
func LoadAllProcesses() []Process
LoadAllProcesses returns a filtered list of processes which are
type SwapData ¶
SwapData model holds all swap related information
func LoadSwapData ¶
LoadSwapData returns all swap related data
type View ¶
type View struct { List *widgets.List SystemInfoList *widgets.List ProcessesWindow *widgets.Table TabPanel *widgets.TabPane Data BasicInfo Grid *ui.Grid RenderTab RenderTab SettingsPage *ui.Grid SettingsList *widgets.List }
View data structure