Put the query package into http, since it is for http only
This commit is contained in:
parent
343b3358a1
commit
3ad3f11b2c
5 changed files with 4 additions and 4 deletions
|
@ -45,7 +45,7 @@ func makeHandler(handler ResponseHandler) httprouter.Handle {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewRouter(s *Server) *httprouter.Router {
|
func newRouter(s *Server) *httprouter.Router {
|
||||||
r := httprouter.New()
|
r := httprouter.New()
|
||||||
|
|
||||||
if s.config.Private {
|
if s.config.Private {
|
||||||
|
@ -79,5 +79,5 @@ func Serve(cfg *config.Config, tkr *tracker.Tracker) {
|
||||||
}
|
}
|
||||||
|
|
||||||
glog.V(0).Info("Starting on ", cfg.Addr)
|
glog.V(0).Info("Starting on ", cfg.Addr)
|
||||||
graceful.Run(cfg.Addr, cfg.RequestTimeout.Duration, NewRouter(srv))
|
graceful.Run(cfg.Addr, cfg.RequestTimeout.Duration, newRouter(srv))
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,7 +36,7 @@ func createServer(tkr *tracker.Tracker, cfg *config.Config) (*httptest.Server, e
|
||||||
config: cfg,
|
config: cfg,
|
||||||
tracker: tkr,
|
tracker: tkr,
|
||||||
}
|
}
|
||||||
return httptest.NewServer(NewRouter(srv)), nil
|
return httptest.NewServer(newRouter(srv)), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func announce(p params, srv *httptest.Server) ([]byte, error) {
|
func announce(p params, srv *httptest.Server) ([]byte, error) {
|
||||||
|
|
|
@ -10,7 +10,7 @@ import (
|
||||||
"github.com/julienschmidt/httprouter"
|
"github.com/julienschmidt/httprouter"
|
||||||
|
|
||||||
"github.com/chihaya/chihaya/config"
|
"github.com/chihaya/chihaya/config"
|
||||||
"github.com/chihaya/chihaya/models/query"
|
"github.com/chihaya/chihaya/http/query"
|
||||||
"github.com/chihaya/chihaya/tracker/models"
|
"github.com/chihaya/chihaya/tracker/models"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue