Chore: Remove bus.Bus field (#47695)

* Chore: Remove bus.Bus field

* fix integration test
This commit is contained in:
Serge Zaitsev
2022-04-13 15:24:13 +02:00
committed by GitHub
parent 337d5bf423
commit e86b6662a1
38 changed files with 70 additions and 204 deletions

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,