Add http server to cmd servers

This commit is contained in:
Asim 2016-11-18 18:03:52 +00:00 committed by Vasiliy Tolstov
parent 216d14971f
commit 31f1702ab2

View File

@ -7,6 +7,7 @@ import (
"net/http"
"sync"
"github.com/micro/go-micro/cmd"
"github.com/micro/go-micro/registry"
"github.com/micro/go-micro/server"
)
@ -18,6 +19,10 @@ type httpServer struct {
exit chan chan error
}
func init() {
cmd.DefaultServers["http"] = NewServer
}
func (h *httpServer) Options() server.Options {
h.Lock()
opts := h.opts