tui

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RenderLossBar

func RenderLossBar(losses []bool, width int) string

RenderLossBar renders a packet loss bar (filled = loss).

func RenderSparkline

func RenderSparkline(values []*float64, width int, avgBaseline float64) string

RenderSparkline converts a slice of values into a sparkline string. nil values are rendered as gaps (space). avgBaseline is used for color thresholds.

Types

type ConnectionStatus

type ConnectionStatus int
const (
	StatusHealthy ConnectionStatus = iota
	StatusDegraded
	StatusDown
)

func (ConnectionStatus) String

func (s ConnectionStatus) String() string

type Model

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

func NewModel

func NewModel(s *store.Store, targets []string, defaultTimeRange string, version string) Model

func (Model) Init

func (m Model) Init() tea.Cmd

func (Model) Update

func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (Model) View

func (m Model) View() string

Jump to

Keyboard shortcuts

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