ui

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2025 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Application

type Application interface {
	QueueUpdateDraw(func()) *tview.Application
}

type DataSource

type DataSource interface {
	Header() []*tview.TableCell
	Update() Update
	HandleInput(event *tcell.EventKey) *tcell.EventKey
}

type LogViewer

type LogViewer struct {
	*tview.TextView
	// contains filtered or unexported fields
}

func (*LogViewer) ToggleWrap

func (v *LogViewer) ToggleWrap()

type Table

type Table struct {
	*tview.Table
	DataSource
}

func NewTable

func NewTable(source DataSource) *Table

func (*Table) Update

func (t *Table) Update()

type UI

type UI struct {
	Root *tview.Grid

	*LogViewer
	// contains filtered or unexported fields
}

func New

func (*UI) Run

func (u *UI) Run(ctx context.Context, app Application, interval time.Duration)

type Update

type Update struct {
	Title  string
	Rows   [][]*tview.TableCell
	Reload bool
}

Jump to

Keyboard shortcuts

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