func NewHttpOutputCreator(httpUri string) (HttpOutputCreator, error) {
	hostname, err := os.Hostname()
	if err != nil {
		return nil, err
	}
	httpPath := ""
	if httpUri != "" {
		u, err := url.Parse(httpUri)
		if err != nil {
			return nil, err
		}
		httpPath = strings.TrimSuffix(u.Path, "/") + "/"
	}
	tmp, err := ioutil.TempDir("", "output")
	if err != nil {
		return nil, err
	}
	return &localOutputCreator{
		tmp: tmp, hostname: hostname,
		httpUri: httpUri, httpPath: httpPath,
		pathMap: make(map[string]string),
	}, nil
}
Takes a tempdir to place new files and optionally an httpUri, ex: 'http://HOST:PORT/ENDPOINT/', to use instead of 'file://HOST/PATH'
package runners
import (
	"fmt"
	"io"
	"io/ioutil"
	"net/http"
	"net/url"
	"os"
	"path/filepath"
	"strings"
	"github.com/twitter/scoot/runner"
	osexecer "github.com/twitter/scoot/runner/execer/os"
)
type HttpOutputCreator interface {
	http.Handler
	runner.OutputCreator
	HttpPath() string
}
type localOutputCreator struct {
	tmp      string
	hostname string
	httpUri  string
	httpPath string
	pathMap  map[string]string
}