output

package
v0.1.0-alpha.3 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package output provides terminal output formatting for gridctl with amber color theme.

Index

Constants

This section is empty.

Variables

View Source
var (
	ColorAmber = lipgloss.Color("#f59e0b") // Primary brand color
	ColorWhite = lipgloss.Color("#fafaf9") // text-text-primary
	ColorMuted = lipgloss.Color("#78716c") // text-text-muted
	ColorGreen = lipgloss.Color("#10b981") // status-running
	ColorRed   = lipgloss.Color("#f43f5e") // status-error
	ColorGray  = lipgloss.Color("#a8a29e") // text-text-secondary
)

Amber color theme based on Gridctl web UI design system. Primary amber (#f59e0b) for key elements.

Functions

This section is empty.

Types

type ContainerSummary

type ContainerSummary struct {
	ID      string
	Name    string
	Type    string // mcp-server, agent, resource
	Image   string
	State   string // running, exited, etc.
	Message string // status message
}

ContainerSummary contains data for the container status table.

type GatewaySummary

type GatewaySummary struct {
	Name    string
	Port    int
	PID     int
	Status  string // running, stopped
	Started string // human-readable duration
}

GatewaySummary contains data for the gateway status table.

type Printer

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

Printer handles terminal output with amber-themed styling.

func New

func New() *Printer

New creates a Printer writing to stdout with amber theme.

func NewWithWriter

func NewWithWriter(w io.Writer) *Printer

NewWithWriter creates a Printer with a custom writer.

func (*Printer) Banner

func (p *Printer) Banner(ver string)

Banner prints the ASCII logo with version information.

func (*Printer) Containers

func (p *Printer) Containers(containers []ContainerSummary)

Containers prints the container status table with amber styling.

func (*Printer) Debug

func (p *Printer) Debug(msg string, keyvals ...any)

Debug logs a debug message with optional key-value pairs.

func (*Printer) Error

func (p *Printer) Error(msg string, keyvals ...any)

Error logs an error message with optional key-value pairs.

func (*Printer) Gateways

func (p *Printer) Gateways(gateways []GatewaySummary)

Gateways prints the gateway status table with amber styling.

func (*Printer) Info

func (p *Printer) Info(msg string, keyvals ...any)

Info logs an info message with optional key-value pairs.

func (*Printer) Print

func (p *Printer) Print(format string, args ...any)

Print writes a message directly to output without formatting.

func (*Printer) Println

func (p *Printer) Println(args ...any)

Println writes a message with newline directly to output.

func (*Printer) Section

func (p *Printer) Section(title string)

Section prints a section header.

func (*Printer) SetDebug

func (p *Printer) SetDebug(enabled bool)

SetDebug enables debug-level logging.

func (*Printer) Summary

func (p *Printer) Summary(workloads []WorkloadSummary)

Summary prints the final status table with amber styling.

func (*Printer) Warn

func (p *Printer) Warn(msg string, keyvals ...any)

Warn logs a warning message with optional key-value pairs.

type WorkloadSummary

type WorkloadSummary struct {
	Name      string
	Type      string // mcp-server, agent, resource
	Transport string // http, stdio, sse, external, local, ssh
	State     string // running, failed, pending
}

WorkloadSummary contains data for the summary table.

Jump to

Keyboard shortcuts

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