Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChildConfig ¶
type ChildConfig struct {
Args []string
Command string
CWD string
Env map[string]string
ReadyURL string
// Stdout and Stderr receive the child's output. Nil means the child
// inherits nimbu's own stdout/stderr (raw passthrough).
Stdout io.Writer
Stderr io.Writer
}
ChildConfig configures the child development server process.
type Console ¶ added in v0.5.0
type Console struct {
// contains filtered or unexported fields
}
Console serializes line-oriented output from several sources onto shared terminal streams: the child dev server, the proxy request log and nimbu's own notices. Every source is line-buffered and writes whole lines under one lock, so no line ever lands in the middle of another.
A source whose line stays unterminated (a "Compiling..." prompt) is shown after a short delay. When another source then needs the screen, the open line is ended first; when the first source continues, its prefix is repeated on the new line.
func NewConsole ¶ added in v0.5.0
func NewConsole() *Console
NewConsole returns a Console with the default partial-line delay.
type ConsoleWriter ¶ added in v0.5.0
type ConsoleWriter struct {
// contains filtered or unexported fields
}
ConsoleWriter is one output source attached to a Console.
func (*ConsoleWriter) Close ¶ added in v0.5.0
func (w *ConsoleWriter) Close() error
Close emits any buffered partial line and ends a line left open on screen.
type Process ¶
type Process struct {
// contains filtered or unexported fields
}
Process supervises the child development server.
func NewProcess ¶
func NewProcess(config ChildConfig) *Process
func (*Process) Kill ¶ added in v0.5.0
Kill force-kills the child's whole process tree immediately and waits up to timeout for it to be reaped. It is the second-Ctrl-C path.