func (inv *Invoker) Run(cmd *runner.Command, id runner.RunID) (abortCh chan<- struct{}, updateCh <-chan runner.RunStatus) {
	abortChFull := make(chan struct{})
	memChFull := make(chan execer.ProcessStatus)
	updateChFull := make(chan runner.RunStatus)
	go inv.run(cmd, id, abortChFull, memChFull, updateChFull)
	return abortChFull, updateChFull
}
Run runs cmd
Run will send updates as the process is running to updateCh.
The RunStatus'es that come out of updateCh will have an empty RunID
Run will enforce cmd's Timeout, and will abort cmd if abortCh is signaled.
updateCh will not close until the run is finished running.
package runners
import (
	e "errors"
	"fmt"
	"io"
	"io/ioutil"
	"os"
	"path/filepath"
	"time"
	log "github.com/sirupsen/logrus"
	"github.com/twitter/scoot/bazel"
	"github.com/twitter/scoot/bazel/cas"
	"github.com/twitter/scoot/bazel/execution/bazelapi"
	"github.com/twitter/scoot/common/errors"
	"github.com/twitter/scoot/common/log/tags"
	scootproto "github.com/twitter/scoot/common/proto"
	"github.com/twitter/scoot/common/stats"
	"github.com/twitter/scoot/runner"
	"github.com/twitter/scoot/runner/execer"
	"github.com/twitter/scoot/runner/execer/execers"
	"github.com/twitter/scoot/snapshot"
	bzsnapshot "github.com/twitter/scoot/snapshot/bazel"
)
func NewInvoker(
	exec execer.Execer,
	filerMap runner.RunTypeMap,
	output runner.OutputCreator,
	stat stats.StatsReceiver,
	dirMonitor *stats.DirsMonitor,
	rID runner.RunnerID,
) *Invoker {
	if stat == nil {
		stat = stats.NilStatsReceiver()
	}
	return &Invoker{exec: exec, filerMap: filerMap, output: output, stat: stat, dirMonitor: dirMonitor, rID: rID}
}
type Invoker struct {
	exec       execer.Execer
	filerMap   runner.RunTypeMap
	output     runner.OutputCreator
	stat       stats.StatsReceiver
	dirMonitor *stats.DirsMonitor
	rID        runner.RunnerID
}