Documentation
¶
Overview ¶
Package output provides terminal output formatting for gridctl with amber color theme.
Index ¶
- Variables
- type ContainerSummary
- type GatewaySummary
- type MCPServerRollup
- type Printer
- func (p *Printer) Banner(ver string)
- func (p *Printer) Containers(containers []ContainerSummary)
- func (p *Printer) Debug(msg string, keyvals ...any)
- func (p *Printer) Error(msg string, keyvals ...any)
- func (p *Printer) Gateways(gateways []GatewaySummary)
- func (p *Printer) Info(msg string, keyvals ...any)
- func (p *Printer) MCPServers(rows []MCPServerRollup)
- func (p *Printer) Print(format string, args ...any)
- func (p *Printer) Println(args ...any)
- func (p *Printer) Replicas(rows []ReplicaDetail)
- func (p *Printer) Section(title string)
- func (p *Printer) SetDebug(enabled bool)
- func (p *Printer) Summary(workloads []WorkloadSummary)
- func (p *Printer) Warn(msg string, keyvals ...any)
- type ReplicaDetail
- type WorkloadSummary
Constants ¶
This section is empty.
Variables ¶
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
PinStatus string // pinned, drift, approved, unpinned, or empty to omit column
}
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
CodeMode string // "on" or empty
}
GatewaySummary contains data for the gateway status table.
type MCPServerRollup ¶
type MCPServerRollup struct {
Name string
Type string // transport label: local-process, container, ssh, external, openapi
Replicas string // "N/M" for sets with replicas > 1, "—" for single-replica servers
State string // "healthy", "degraded (replica-N restarting, next in 4s)", "unhealthy"
Autoscale string // "min/current/max (target=N)" for autoscaled servers, empty for static
}
MCPServerRollup is one row of the rolled-up MCP-servers table shown by `gridctl status`. A server with a single replica uses "—" in the Replicas column to match the UX spec.
type Printer ¶
type Printer struct {
// contains filtered or unexported fields
}
Printer handles terminal output with amber-themed styling.
func NewWithWriter ¶
NewWithWriter creates a Printer with a custom writer.
func (*Printer) Containers ¶
func (p *Printer) Containers(containers []ContainerSummary)
Containers prints the container status table with amber styling.
func (*Printer) Gateways ¶
func (p *Printer) Gateways(gateways []GatewaySummary)
Gateways prints the gateway status table with amber styling.
func (*Printer) MCPServers ¶
func (p *Printer) MCPServers(rows []MCPServerRollup)
MCPServers prints the rolled-up MCP-server status table. The AUTOSCALE column is shown only when at least one row has autoscale configured, so static-only stacks see an unchanged table.
func (*Printer) Replicas ¶
func (p *Printer) Replicas(rows []ReplicaDetail)
Replicas prints the per-replica detail table used by `gridctl status --replicas`. The AUTOSCALE column only appears when at least one row populates it.
func (*Printer) Summary ¶
func (p *Printer) Summary(workloads []WorkloadSummary)
Summary prints the final status table with amber styling.
type ReplicaDetail ¶
type ReplicaDetail struct {
Server string
Replica int
Handle string // PID for local-process, container id prefix for container-backed
State string
Uptime string
InFlight int64
Autoscale string // "min/current/max (target=N)" — repeated per replica row for server-level info, empty for static servers
}
ReplicaDetail is one row of the expanded `gridctl status --replicas` view.