Version: v0.0.0-...-86119bb Latest Latest

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

Go to latest
Published: Jul 21, 2015 License: MIT Imports: 4 Imported by: 0




This section is empty.


This section is empty.


This section is empty.


type ByteChannelWriter

type ByteChannelWriter struct {
	// contains filtered or unexported fields

ByteChannelWriter provides a newline buffered io.Writer that writes each line to the given channel - it is NOT ok to create a ByteChannelWriter using anything other than NewByteChannelWriter()

func NewByteChannelWriter

func NewByteChannelWriter(ch chan []byte) *ByteChannelWriter

NewByteChannelWriter creates a new ByteChannelWriter on the given chan []byte

func (*ByteChannelWriter) Write

func (cw *ByteChannelWriter) Write(p []byte) (n int, err error)

type Config

type Config struct {
	Command []string
	Logfile string

A Config contains all neccessary information to launch a process

type Process

type Process struct {
	Command []string
	Stdin   chan []byte
	Stdout  chan []byte
	Stderr  chan []byte
	// contains filtered or unexported fields

A Process is an instance of a program

func NewProcess

func NewProcess(conf *Config) (*Process, error)

NewProcess creates a new process from the given config

func (*Process) Kill

func (p *Process) Kill()

Kill sends a kill command to the control channel

func (*Process) Run

func (p *Process) Run()

Run launches the process along with its control channel

func (*Process) StdoutMonitor

func (p *Process) StdoutMonitor()

StdoutMonitor just prints the process Std{out,err} to os.Stdout helpful for debugging/testing individual processes

Jump to

Keyboard shortcuts

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