GoogleCloudMonitoring: Refactor query type definition (#58512)

This commit is contained in:
Andres Martinez Gotor
2022-11-10 09:30:47 +01:00
committed by GitHub
parent 70dac35348
commit 1201170724
8 changed files with 107 additions and 67 deletions
+1 -9
View File
@@ -9,8 +9,6 @@ import (
"github.com/grafana/grafana-plugin-sdk-go/backend"
"github.com/grafana/grafana-plugin-sdk-go/data"
"github.com/grafana/grafana/pkg/infra/log"
)
type annotationEvent struct {
@@ -20,15 +18,9 @@ type annotationEvent struct {
Text string
}
func (s *Service) executeAnnotationQuery(ctx context.Context, logger log.Logger, req *backend.QueryDataRequest, dsInfo datasourceInfo) (
func (s *Service) executeAnnotationQuery(ctx context.Context, req *backend.QueryDataRequest, dsInfo datasourceInfo, queries []cloudMonitoringQueryExecutor) (
*backend.QueryDataResponse, error) {
resp := backend.NewQueryDataResponse()
queries, err := s.buildQueryExecutors(logger, req)
if err != nil {
return resp, err
}
queryRes, dr, _, err := queries[0].run(ctx, req, s, dsInfo, s.tracer)
if err != nil {
return resp, err