Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewHandler ¶
func NewHandler(cfg Config) func(chan *client.SolveStatus) error
NewHandler returns a buildkit status handler function compatible with internal/buildkit.Client.Build(). It reads the channel until it is closed, rendering each status update according to cfg.
Types ¶
type Colors ¶
type Colors struct {
Running string // step currently executing — default: bright blue
Done string // step completed successfully — default: green
Cached string // step result from cache — default: dim green
Warning string // build warning — default: yellow
Error string // step failed — default: red
Log string // script / log output — default: dim (gray)
Stage string // bracketed stage prefix — default: cyan
Index string // step index (#1, #2, …) — default: dim
Elapsed string // elapsed time (1.2s) — default: dim
Reset string // reset all attributes — default: "\x1b[0m"
}
Colors holds ANSI escape sequences for each status type. Set a field to an empty string to suppress color for that status.
func DefaultColors ¶
func DefaultColors() Colors
DefaultColors returns the color scheme aligned with the tint-based slog handler.
type Config ¶
type Config struct {
Mode DisplayMode
Writer io.Writer
Colors Colors
// NoColor suppresses all ANSI color output when true.
// Typically set from os.Getenv("NO_COLOR") != "".
NoColor bool
}
Config holds all display configuration.
type DisplayMode ¶
type DisplayMode int
DisplayMode controls how build output is rendered.
const ( // AutoMode detects whether the writer is a TTY: interactive if so, linear otherwise. AutoMode DisplayMode = iota // InteractiveMode forces TTY-style cursor-movement output. InteractiveMode // LinearMode forces one-line-per-event output, suitable for CI logs. LinearMode )
Click to show internal directories.
Click to hide internal directories.