display

package
v0.0.3 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

func FormatRecord

func FormatRecord(r model.Record) string

func MatchesFilter

func MatchesFilter(rec model.Record, filter string) bool

func PrintMap

func PrintMap(
	w io.Writer, records []model.Record,
	svcMap docker.ServiceMap,
)

PrintMap renders an aggregated service dependency summary to w.

func PrintTree

func PrintTree(
	w io.Writer, records []model.Record,
	svcMap docker.ServiceMap, traceID string,
)

PrintTree renders a request chain as an ASCII tree for the given trace ID.

func ResolveName

func ResolveName(svcMap docker.ServiceMap, ip string) string

func StreamWatch

func StreamWatch(
	ctx context.Context, r io.Reader,
	resolve ServiceResolver, filter string, w io.Writer,
) error

StreamWatch reads NDJSON records from r and writes formatted output to w. It resolves IPs to service names using resolve and optionally filters by service name. It blocks until ctx is cancelled or r is exhausted.

If r implements io.Closer it will be closed when ctx is cancelled so that a blocking read is interrupted promptly.

Types

type ServiceResolver

type ServiceResolver func() docker.ServiceMap

ServiceResolver returns the current service map snapshot. It is called for each record so that updates are reflected in real time.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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