tui

package
v0.69.0 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2026 License: Apache-2.0 Imports: 32 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package tui provides an interactive terminal dashboard for ToolHive.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StreamProxyLogs

func StreamProxyLogs(ctx context.Context, manager workloads.Manager, name string) <-chan string

StreamProxyLogs polls manager.GetProxyLogs for the given workload and sends new lines to the returned channel. Cancel ctx to stop.

func StreamWorkloadLogs

func StreamWorkloadLogs(ctx context.Context, manager workloads.Manager, name string) <-chan string

StreamWorkloadLogs starts a goroutine that polls manager.GetLogs for the given workload name and sends new log lines to the returned channel. Cancel the context to stop streaming.

Types

type Model

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

Model is the top-level BubbleTea model for the TUI dashboard.

func New

func New(ctx context.Context, manager workloads.Manager, logCh <-chan string) (Model, error)

New creates a new TUI model. logCh (optional) receives slog WARN/ERROR messages captured while the TUI runs.

func (Model) Init

func (m Model) Init() tea.Cmd

Init starts background ticks for workload refresh.

func (Model) Update

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

Update handles all incoming messages and key events.

func (Model) View

func (m Model) View() tea.View

View implements tea.Model and renders the full TUI.

Jump to

Keyboard shortcuts

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