mirror of
https://github.com/grafana/grafana.git
synced 2025-08-02 21:52:43 +08:00
Revert "Plugins: Update PDC pattern from latest plugin SDK changes" (#76565)
Revert "Plugins: Update PDC pattern from latest plugin SDK changes (#76036)" This reverts commit 151f6d6216e5e93edf56e4bbc6d3bfa5e0690b45.
This commit is contained in:
@ -76,7 +76,6 @@ func (cp *corePlugin) CollectMetrics(_ context.Context, _ *backend.CollectMetric
|
||||
|
||||
func (cp *corePlugin) CheckHealth(ctx context.Context, req *backend.CheckHealthRequest) (*backend.CheckHealthResult, error) {
|
||||
if cp.CheckHealthHandler != nil {
|
||||
ctx = backend.WithGrafanaConfig(ctx, req.PluginContext.GrafanaConfig)
|
||||
return cp.CheckHealthHandler.CheckHealth(ctx, req)
|
||||
}
|
||||
|
||||
@ -85,7 +84,6 @@ func (cp *corePlugin) CheckHealth(ctx context.Context, req *backend.CheckHealthR
|
||||
|
||||
func (cp *corePlugin) QueryData(ctx context.Context, req *backend.QueryDataRequest) (*backend.QueryDataResponse, error) {
|
||||
if cp.QueryDataHandler != nil {
|
||||
ctx = backend.WithGrafanaConfig(ctx, req.PluginContext.GrafanaConfig)
|
||||
return cp.QueryDataHandler.QueryData(ctx, req)
|
||||
}
|
||||
|
||||
@ -94,7 +92,6 @@ func (cp *corePlugin) QueryData(ctx context.Context, req *backend.QueryDataReque
|
||||
|
||||
func (cp *corePlugin) CallResource(ctx context.Context, req *backend.CallResourceRequest, sender backend.CallResourceResponseSender) error {
|
||||
if cp.CallResourceHandler != nil {
|
||||
ctx = backend.WithGrafanaConfig(ctx, req.PluginContext.GrafanaConfig)
|
||||
return cp.CallResourceHandler.CallResource(ctx, req, sender)
|
||||
}
|
||||
|
||||
@ -103,7 +100,6 @@ func (cp *corePlugin) CallResource(ctx context.Context, req *backend.CallResourc
|
||||
|
||||
func (cp *corePlugin) SubscribeStream(ctx context.Context, req *backend.SubscribeStreamRequest) (*backend.SubscribeStreamResponse, error) {
|
||||
if cp.StreamHandler != nil {
|
||||
ctx = backend.WithGrafanaConfig(ctx, req.PluginContext.GrafanaConfig)
|
||||
return cp.StreamHandler.SubscribeStream(ctx, req)
|
||||
}
|
||||
return nil, plugins.ErrMethodNotImplemented
|
||||
@ -111,7 +107,6 @@ func (cp *corePlugin) SubscribeStream(ctx context.Context, req *backend.Subscrib
|
||||
|
||||
func (cp *corePlugin) PublishStream(ctx context.Context, req *backend.PublishStreamRequest) (*backend.PublishStreamResponse, error) {
|
||||
if cp.StreamHandler != nil {
|
||||
ctx = backend.WithGrafanaConfig(ctx, req.PluginContext.GrafanaConfig)
|
||||
return cp.StreamHandler.PublishStream(ctx, req)
|
||||
}
|
||||
return nil, plugins.ErrMethodNotImplemented
|
||||
@ -119,7 +114,6 @@ func (cp *corePlugin) PublishStream(ctx context.Context, req *backend.PublishStr
|
||||
|
||||
func (cp *corePlugin) RunStream(ctx context.Context, req *backend.RunStreamRequest, sender *backend.StreamSender) error {
|
||||
if cp.StreamHandler != nil {
|
||||
ctx = backend.WithGrafanaConfig(ctx, req.PluginContext.GrafanaConfig)
|
||||
return cp.StreamHandler.RunStream(ctx, req, sender)
|
||||
}
|
||||
return plugins.ErrMethodNotImplemented
|
||||
|
Reference in New Issue
Block a user