Chore: Remove bus.Bus field (#47695) (#47704)

* Chore: Remove bus.Bus field

* fix integration test

(cherry picked from commit e86b6662a1)

Co-authored-by: Serge Zaitsev <serge.zaitsev@grafana.com>
This commit is contained in:
Grot (@grafanabot)
2022-04-13 19:11:20 +02:00
committed by GitHub
co-authored by Serge Zaitsev
parent 5332a2db05
commit f01f1073b8
38 changed files with 70 additions and 204 deletions
+1 -4
View File
@@ -10,7 +10,6 @@ import (
"go.opentelemetry.io/otel/attribute"
"golang.org/x/sync/errgroup"
"github.com/grafana/grafana/pkg/bus"
"github.com/grafana/grafana/pkg/infra/log"
"github.com/grafana/grafana/pkg/infra/tracing"
"github.com/grafana/grafana/pkg/infra/usagestats"
@@ -41,7 +40,6 @@ type AlertStore interface {
// are sent.
type AlertEngine struct {
RenderService rendering.Service
Bus bus.Bus
RequestValidator models.PluginRequestValidator
DataService legacydata.RequestHandler
Cfg *setting.Cfg
@@ -65,14 +63,13 @@ func (e *AlertEngine) IsDisabled() bool {
}
// ProvideAlertEngine returns a new AlertEngine.
func ProvideAlertEngine(renderer rendering.Service, bus bus.Bus, requestValidator models.PluginRequestValidator,
func ProvideAlertEngine(renderer rendering.Service, requestValidator models.PluginRequestValidator,
dataService legacydata.RequestHandler, usageStatsService usagestats.Service, encryptionService encryption.Internal,
notificationService *notifications.NotificationService, tracer tracing.Tracer, sqlStore AlertStore, cfg *setting.Cfg,
dashAlertExtractor DashAlertExtractor) *AlertEngine {
e := &AlertEngine{
Cfg: cfg,
RenderService: renderer,
Bus: bus,
RequestValidator: requestValidator,
DataService: dataService,
usageStatsService: usageStatsService,