Plugins: Refactor creation of plugin context to dedicated service (#66451)

* first pass

* fix tests

* return errs

* change signature

* tidy

* delete unnecessary fields from test

* tidy

* fix tests

* simplify

* separate error check in API

* apply nits
This commit is contained in:
Will Browne
2023-06-08 13:59:51 +02:00
committed by GitHub
parent 49ad802ca6
commit 624777258b
25 changed files with 308 additions and 261 deletions
+2 -2
View File
@@ -111,7 +111,7 @@ type HTTPServer struct {
namedMiddlewares []routing.RegisterNamedMiddleware
bus bus.Bus
PluginContextProvider *plugincontext.Provider
pluginContextProvider *plugincontext.Provider
RouteRegister routing.RouteRegister
RenderService rendering.Service
Cfg *setting.Cfg
@@ -291,7 +291,7 @@ func ProvideHTTPServer(opts ServerOptions, cfg *setting.Cfg, routeRegister routi
SearchService: searchService,
Live: live,
LivePushGateway: livePushGateway,
PluginContextProvider: plugCtxProvider,
pluginContextProvider: plugCtxProvider,
ContextHandler: contextHandler,
LoggerMiddleware: loggerMiddleware,
AlertNG: alertNG,