tui

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppExitMsg

type AppExitMsg struct{}

AppExitMsg is sent when the trace source disconnects.

type Bridge

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

Bridge connects the tracer collector to the TUI via bubbletea messages.

func NewBridge

func NewBridge(p *tea.Program) *Bridge

NewBridge creates a bridge that sends trace trees to the TUI program.

func (*Bridge) OnSpan

func (b *Bridge) OnSpan(traceID string, span tracer.Span)

OnSpan handles a completed span. When the root arrives, builds the tree and sends it to the TUI.

type ErrorMsg

type ErrorMsg struct {
	Err error
}

ErrorMsg is sent when the view client encounters an error.

type Model

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

Model is the bubbletea model for the go-trace TUI.

func New

func New(mg *analysis.MatchingGroups) Model

New creates a new TUI model.

func (Model) Err

func (m Model) Err() error

Err returns the error that caused the TUI to exit, if any.

func (Model) Init

func (m Model) Init() tea.Cmd

Init implements tea.Model.

func (Model) Update

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

Update implements tea.Model.

func (Model) View

func (m Model) View() string

View implements tea.Model.

type TraceMsg

type TraceMsg struct {
	Root tracer.Span
}

TraceMsg is sent when a complete trace tree is ready.

Jump to

Keyboard shortcuts

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