Add http server to cmd servers
This commit is contained in:
		
							
								
								
									
										5
									
								
								http.go
									
									
									
									
									
								
							
							
						
						
									
										5
									
								
								http.go
									
									
									
									
									
								
							| @@ -7,6 +7,7 @@ import ( | |||||||
| 	"net/http" | 	"net/http" | ||||||
| 	"sync" | 	"sync" | ||||||
|  |  | ||||||
|  | 	"github.com/micro/go-micro/cmd" | ||||||
| 	"github.com/micro/go-micro/registry" | 	"github.com/micro/go-micro/registry" | ||||||
| 	"github.com/micro/go-micro/server" | 	"github.com/micro/go-micro/server" | ||||||
| ) | ) | ||||||
| @@ -18,6 +19,10 @@ type httpServer struct { | |||||||
| 	exit chan chan error | 	exit chan chan error | ||||||
| } | } | ||||||
|  |  | ||||||
|  | func init() { | ||||||
|  | 	cmd.DefaultServers["http"] = NewServer | ||||||
|  | } | ||||||
|  |  | ||||||
| func (h *httpServer) Options() server.Options { | func (h *httpServer) Options() server.Options { | ||||||
| 	h.Lock() | 	h.Lock() | ||||||
| 	opts := h.opts | 	opts := h.opts | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user