routing: allows routes to be added to existing groups

this enables services to add routing to ex /api
without causing conflicts.
This commit is contained in:
bergquist
2018-06-25 16:50:27 +02:00
parent 503c8cd8ef
commit dbfafa1cb5
5 changed files with 117 additions and 38 deletions
+5 -4
View File
@@ -11,6 +11,7 @@ import (
"path"
"time"
"github.com/grafana/grafana/pkg/api/routing"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promhttp"
@@ -43,10 +44,10 @@ type HTTPServer struct {
cache *gocache.Cache
httpSrv *http.Server
RouteRegister RouteRegister `inject:""`
Bus bus.Bus `inject:""`
RenderService rendering.Service `inject:""`
Cfg *setting.Cfg `inject:""`
RouteRegister routing.RouteRegister `inject:""`
Bus bus.Bus `inject:""`
RenderService rendering.Service `inject:""`
Cfg *setting.Cfg `inject:""`
}
func (hs *HTTPServer) Init() error {