Plugins: Bump Plugin SDK version and address instance management breaking changes (#68900)

* bump sdk and propagate ctx

* fix tests
This commit is contained in:
Will Browne
2023-05-24 10:19:34 +02:00
committed by GitHub
parent 7e816d010c
commit 286b9e08e9
50 changed files with 199 additions and 170 deletions
+3 -2
View File
@@ -1,6 +1,7 @@
package models
import (
"context"
"net/url"
"github.com/aws/aws-sdk-go/service/cloudwatch"
@@ -12,9 +13,9 @@ import (
"github.com/grafana/grafana/pkg/tsdb/cloudwatch/models/resources"
)
type RequestContextFactoryFunc func(pluginCtx backend.PluginContext, region string) (reqCtx RequestContext, err error)
type RequestContextFactoryFunc func(ctx context.Context, pluginCtx backend.PluginContext, region string) (reqCtx RequestContext, err error)
type RouteHandlerFunc func(pluginCtx backend.PluginContext, reqContextFactory RequestContextFactoryFunc, parameters url.Values) ([]byte, *HttpError)
type RouteHandlerFunc func(ctx context.Context, pluginCtx backend.PluginContext, reqContextFactory RequestContextFactoryFunc, parameters url.Values) ([]byte, *HttpError)
type RequestContext struct {
MetricsClientProvider MetricsClientProvider