Documentation ¶
Overview ¶
Package tandem provides a process manager utility for running multiple processes and combining their output.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Cmds []string // Shell commands to run Root string // Root directory for commands to run from Timeout int // Timeout in seconds for commands to exit gracefully before being killed. Defaults to 0. Silent bool // Whether to silence process management messages like "Starting..." }
Config is the configuration for a process manager.
type ProcessManager ¶
type ProcessManager struct {
// contains filtered or unexported fields
}
ProcessManager manages a set of processes, combining their output and exiting all of them gracefully when one of them exits.
func New ¶
func New(cfg Config) (*ProcessManager, error)
New creates a new process manager with the given configuration.
func (*ProcessManager) Run ¶
func (pm *ProcessManager) Run()
Run starts all processes and waits for them to exit or be interrupted.
Click to show internal directories.
Click to hide internal directories.