display

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: 8 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config added in v1.1.8

type Config interface {
	Hostname() string
	MySQLVersion() string
	WantRelativeStats() bool
	Uptime() int
}

Config provides the interfce to some required configuration settings needed by Display

type Display

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

Display contains screen specific display information

func NewDisplay added in v1.0.11

func NewDisplay(config Config) *Display

NewDisplay returns a Display with an empty terminal

func (*Display) Clear added in v1.1.9

func (display *Display) Clear()

Clear clears the screen and flushes out the result to the terminal

func (*Display) Display added in v0.4.3

func (display *Display) Display(gd GenericData)

Display displays the wanted view to the screen

func (*Display) DisplayHelp

func (display *Display) DisplayHelp()

DisplayHelp displays a help page on the screen

func (*Display) EventChan

func (display *Display) EventChan() chan event.Event

EventChan creates a channel of display events and run a poller to send these events to the channel. Return the channel which the application can use

func (*Display) Fini added in v1.1.9

func (display *Display) Fini()

Fini is called prior to finishing using the display

func (*Display) Resize

func (display *Display) Resize(width, height int)

Resize records the new size of the screen and resizes it - if the terminal gets smaller assume that the larger areas are just truncated so we do nothing. - if the terminal gets longer then clear out the bottom line(s). - if the terminal gets wider it should be "blank" so no need to do anything.

func (*Display) Show added in v1.1.9

func (display *Display) Show()

Show pushes out the pending changes to the screen

type GenericData added in v0.4.3

type GenericData interface {
	Description() string         // description of the information being displayed
	Headings() string            // headings for the data
	FirstCollectTime() time.Time // initial time data was collected
	LastCollectTime() time.Time  // last time data was collected
	RowContent() []string        // a slice of rows of content
	TotalRowContent() string     // a string containing the details of a single row
	EmptyRowContent() string     // a string containing the details of an empty row
	HaveRelativeStats() bool     // does this data type have relative statistics
}

GenericData is a generic interface to data collected from P_S (multiple rows)

Jump to

Keyboard shortcuts

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