tandem

package
v0.0.0-...-2c49a4a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 3, 2023 License: MIT Imports: 16 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL