CloudWatch: remove unused "live" log code (#44185)

This commit is contained in:
Isabella Siu
2022-01-20 08:58:39 -05:00
committed by GitHub
parent 74193b3c1b
commit 2c3bed1f4b
10 changed files with 40 additions and 413 deletions
+1 -11
View File
@@ -46,7 +46,6 @@ import (
"github.com/grafana/grafana/pkg/services/secrets"
"github.com/grafana/grafana/pkg/services/sqlstore"
"github.com/grafana/grafana/pkg/setting"
"github.com/grafana/grafana/pkg/tsdb/cloudwatch"
"github.com/grafana/grafana/pkg/util"
"github.com/grafana/grafana/pkg/web"
"golang.org/x/sync/errgroup"
@@ -66,14 +65,13 @@ type CoreGrafanaScope struct {
}
func ProvideService(plugCtxProvider *plugincontext.Provider, cfg *setting.Cfg, routeRegister routing.RouteRegister,
logsService *cloudwatch.LogsService, pluginStore plugins.Store, cacheService *localcache.CacheService,
pluginStore plugins.Store, cacheService *localcache.CacheService,
dataSourceCache datasources.CacheService, sqlStore *sqlstore.SQLStore, secretsService secrets.Service,
usageStatsService usagestats.Service, queryDataService *query.Service) (*GrafanaLive, error) {
g := &GrafanaLive{
Cfg: cfg,
PluginContextProvider: plugCtxProvider,
RouteRegister: routeRegister,
LogsService: logsService,
pluginStore: pluginStore,
CacheService: cacheService,
DataSourceCache: dataSourceCache,
@@ -394,7 +392,6 @@ type GrafanaLive struct {
PluginContextProvider *plugincontext.Provider
Cfg *setting.Cfg
RouteRegister routing.RouteRegister
LogsService *cloudwatch.LogsService
CacheService *localcache.CacheService
DataSourceCache datasources.CacheService
SQLStore *sqlstore.SQLStore
@@ -895,13 +892,6 @@ func (g *GrafanaLive) handleGrafanaScope(_ *models.SignedInUser, namespace strin
}
func (g *GrafanaLive) handlePluginScope(ctx context.Context, _ *models.SignedInUser, namespace string) (models.ChannelHandlerFactory, error) {
// Temporary hack until we have a more generic solution later on
if namespace == "cloudwatch" {
return &cloudwatch.LogQueryRunnerSupplier{
Publisher: g.Publish,
Service: g.LogsService,
}, nil
}
streamHandler, err := g.getStreamPlugin(ctx, namespace)
if err != nil {
return nil, fmt.Errorf("can't find stream plugin: %s", namespace)