Documentation ¶
Index ¶
- type Config
- type Display
- type GenericData
- type HelpType
- func (h HelpType) Description() string
- func (h HelpType) EmptyRowContent() string
- func (h HelpType) FirstCollectTime() time.Time
- func (h HelpType) HaveRelativeStats() bool
- func (h HelpType) Headings() string
- func (h HelpType) LastCollectTime() time.Time
- func (h HelpType) RowContent() []string
- func (h HelpType) TotalRowContent() string
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
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 ¶
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
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 (HelpType) EmptyRowContent ¶ added in v1.1.10
func (HelpType) FirstCollectTime ¶ added in v1.1.10
func (HelpType) HaveRelativeStats ¶ added in v1.1.10
func (HelpType) LastCollectTime ¶ added in v1.1.10
func (HelpType) RowContent ¶ added in v1.1.10
func (HelpType) TotalRowContent ¶ added in v1.1.10
Click to show internal directories.
Click to hide internal directories.