Worker wrapper package

This change defines the package that will be used by the worker wrapper
program. It implements the interface defines in the standalone interface
spec for the wrapper process.

It tests the library with a bunch of simple scripts that exercise each
of the components of the interface.

This relies on a couple mock changes in another PR which is why
the tests are failing.
We do - all the event stuff deals with streaming data
On Aug 15, 2014 12:58 PM, "Kyle Vigen" <notifications@github.com> wrote:

> In taskwrapper/worker.go:
>
> > +
> > +	// Write the stdout and stderr of the process to both this process' stdout and stderr
> > +	// and also write it to a byte buffer so that we can return it with the Gearman job
> > +	// data as necessary.
> > +	var stderrbuf bytes.Buffer
> > +	cmd.Stderr = io.MultiWriter(os.Stderr, &stderrbuf)
> > +	var stdoutbuf bytes.Buffer
> > +	cmd.Stdout = io.MultiWriter(os.Stdout, &stdoutbuf)
> > +	if err := cmd.Start(); err != nil {
> > +		return nil, err
> > +	}
> > +	if err := cmd.Wait(); err != nil {
> > +		return nil, err
> > +	}
> > +	sendStderrWarnings(stderrbuf, job, conf.WarningLines)
> > +	job.SendData(stdoutbuf.Bytes())
>
> Do we have pipelines right now where not streaming would be a bottleneck?
> If not, this is something we could easily change in the future if / when we
> need to.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/Clever/baseworker-go/pull/8/files#r16312345>.
>