app

package
v1.1.9 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2023 License: BSD-2-Clause Imports: 28 Imported by: 2

Documentation

Overview

Package app is the "runtime" for the ps-top application.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	Finished bool // has the app finished?

	Help bool // show help (during runtime)
	// contains filtered or unexported fields
}

App holds the data needed by an application

func NewApp added in v0.6.0

func NewApp(
	connectorFlags connector.Config,
	settings Settings) (*App, error)

NewApp sets up the application given various parameters returning a posisble if initialisation fails.

func (*App) Cleanup

func (app *App) Cleanup()

Cleanup prepares the application prior to shutting down

func (*App) Collect

func (app *App) Collect()

Collect the data we are looking at.

func (*App) Display

func (app *App) Display()

Display shows the output appropriate to the corresponding view and device

func (*App) Run

func (app *App) Run()

Run runs the application in a loop until we're ready to finish

func (*App) SetHelp

func (app *App) SetHelp(help bool)

SetHelp determines if we need to display help

func (*App) UpdateCurrentTabler added in v1.1.8

func (app *App) UpdateCurrentTabler()

UpdateCurrentTabler updates the current tabler to use

type Settings added in v0.7.5

type Settings struct {
	Anonymise bool                   // Do we want to anonymise data shown?
	Filter    *filter.DatabaseFilter // optional names of databases to filter on
	Interval  int                    // default interval to poll information
	ViewName  string                 // name of the view to start with
}

Settings holds the application configuration settingss from the command line.

Jump to

Keyboard shortcuts

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