func newSchedulerProcess(eventQ chan<- interface{}) (*schedulerProcess, error) {
	if eventQ == nil {
		return nil, fmt.Errorf("SchedulerProcess - eventQ parameber cannot be nil.")
	}
	serv := &http.Server{
	}
	proc := &schedulerProcess{
		server:    serv,
		eventMsgQ: eventQ,
		controlQ:  make(chan int32),
		started:   false,
		aborted:   false,
	}
	return proc, nil
}
newSchedHttpProcess creates and starts htttp process.
package gomes
import (
	"code.google.com/p/goprotobuf/proto"
	"fmt"
	mesos "github.com/vladimirvivien/gomes/mesosproto"
	"io/ioutil"
	"net"
	"net/http"
	"net/url"
	"path"
	"strconv"
	"strings"
	"sync"
)
var schedIdMutex = new(sync.Mutex)
var schedIdCounter = 0
type schedProcID struct {
	prefix string
	value  string
}
func newSchedProcID(addr string) schedProcID {
	cntStr := strconv.Itoa(schedIdCounter)
	prefix := MESOS_SCHEDULER_PREFIX + "(" + cntStr + ")"
	value := prefix + "@" + addr
	id := schedProcID{prefix: prefix, value: value}
	schedIdMutex.Lock()
	schedIdCounter = schedIdCounter + 1
	schedIdMutex.Unlock()
	return id
}
func (id *schedProcID) asURL() (*url.URL, error) {
	return url.Parse("http://" + id.value)
}
type schedulerProcess struct {
	listener  net.Listener
	server    *http.Server
	processId schedProcID
	eventMsgQ chan<- interface{}
	controlQ  chan int32
	started   bool
	aborted   bool
}