ui

package
v0.0.0-...-571b077 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const RefreshRate = time.Second / 60

Refresh rate for display.

Variables

This section is empty.

Functions

This section is empty.

Types

type Graph

type Graph struct {
	Data   []float64
	Object *tview.TextView
}

func (*Graph) Update

func (g *Graph) Update(data float64)

Takes a new value and updates graph, keeping it the same width.

type UI

type UI struct {
	App       *tview.Application
	Layout    *tview.Grid
	Graph     *Graph
	Progress  *tvxwidgets.PercentageModeGauge
	PeerTable *tview.Table
	PeerPages *tview.Pages
	// contains filtered or unexported fields
}

func NewUI

func NewUI(t *torrent.Torrent, peers map[string]*p2p.Peer) (*UI, error)

Creates a new UI instance.

func (*UI) UpdateProgress

func (ui *UI) UpdateProgress(done int)

func (*UI) UpdateTable

func (ui *UI) UpdateTable()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳