display

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: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildTree

func BuildTree(spans []tracer.Span) tracer.Span

BuildTree assembles a span tree from a flat slice.

func FormatTree

func FormatTree(spans []tracer.Span) string

FormatTree builds a trace tree from flat spans and returns the formatted string. Useful for TUI and testing.

Types

type Renderer

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

Renderer buffers completed spans and prints a trace tree when the root span (no parent) arrives.

func NewRenderer

func NewRenderer(w io.Writer) *Renderer

NewRenderer creates a renderer that writes trees to w.

func (*Renderer) Add

func (r *Renderer) Add(traceID string, span tracer.Span)

Add buffers a completed span. When the root span arrives, the full trace tree is printed and the buffer is cleared.

Jump to

Keyboard shortcuts

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