Documentation
¶
Overview ¶
Package printer provides formatted terminal output for Stackup operations.
Index ¶
- type Printer
- func (p *Printer) Bold(s string) string
- func (p *Printer) CleanupSuggestion(runningSvcs []string)
- func (p *Printer) ClearScreen()
- func (p *Printer) Dim(s string) string
- func (p *Printer) EnvDefault(key, val string)
- func (p *Printer) EnvKeyValid(key, typ string)
- func (p *Printer) EnvValid(keyCount int)
- func (p *Printer) Green(s string) string
- func (p *Printer) Hint(lines ...string)
- func (p *Printer) IsTTY() bool
- func (p *Printer) Phase(name string)
- func (p *Printer) Ready(total time.Duration)
- func (p *Printer) Red(s string) string
- func (p *Printer) ServiceFailed(name string, err error)
- func (p *Printer) ServiceHealthy(name, checkType string, duration time.Duration)
- func (p *Printer) ServiceLogs(name string, logs string)
- func (p *Printer) ServiceWaiting(name string, elapsed time.Duration)
- func (p *Printer) SummaryTable(results []ServiceResult, total time.Duration)
- func (p *Printer) ValidationError(key, message string)
- func (p *Printer) Writer() io.Writer
- func (p *Printer) Yellow(s string) string
- type ServiceResult
- type Spinner
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Printer ¶
type Printer struct {
// contains filtered or unexported fields
}
Printer writes structured, human-readable output to a writer.
func (*Printer) CleanupSuggestion ¶
CleanupSuggestion advises the user to run stackup down.
func (*Printer) ClearScreen ¶
func (p *Printer) ClearScreen()
ClearScreen sends ANSI escape sequences to move cursor home and clear the screen. No-op when output is not a TTY.
func (*Printer) EnvDefault ¶
EnvDefault reports a schema default was injected for a missing key.
func (*Printer) EnvKeyValid ¶
EnvKeyValid reports a single env key passed type validation.
func (*Printer) ServiceFailed ¶
ServiceFailed reports a service health check failure.
func (*Printer) ServiceHealthy ¶
ServiceHealthy reports a service passed its health check.
func (*Printer) ServiceLogs ¶
ServiceLogs prints the tail of a service's container logs.
func (*Printer) ServiceWaiting ¶
ServiceWaiting reports a service is still being checked.
func (*Printer) SummaryTable ¶
func (p *Printer) SummaryTable(results []ServiceResult, total time.Duration)
SummaryTable prints a bordered table of service health check results.
func (*Printer) ValidationError ¶
ValidationError reports an env validation failure.
type ServiceResult ¶
ServiceResult records the outcome of a health check for summary display.
type Spinner ¶
type Spinner struct {
// contains filtered or unexported fields
}
Spinner provides an animated progress indicator for long-running operations.
func NewSpinner ¶
NewSpinner creates a spinner that writes to the given writer.