display

package
v1.1.13 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2024 License: BSD-2-Clause Imports: 9 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) 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 clears it

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)

type HelpType added in v1.1.10

type HelpType struct{}

HelpType is a help information provided by the genric interface

var Help HelpType // empty initialisation should be ok for providing help

func (HelpType) Description added in v1.1.10

func (h HelpType) Description() string

func (HelpType) EmptyRowContent added in v1.1.10

func (h HelpType) EmptyRowContent() string

func (HelpType) FirstCollectTime added in v1.1.10

func (h HelpType) FirstCollectTime() time.Time

func (HelpType) HaveRelativeStats added in v1.1.10

func (h HelpType) HaveRelativeStats() bool

func (HelpType) Headings added in v1.1.10

func (h HelpType) Headings() string

func (HelpType) LastCollectTime added in v1.1.10

func (h HelpType) LastCollectTime() time.Time

func (HelpType) RowContent added in v1.1.10

func (h HelpType) RowContent() []string

func (HelpType) TotalRowContent added in v1.1.10

func (h HelpType) TotalRowContent() string

Jump to

Keyboard shortcuts

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