use most appropriate func for registering core plugins (#38497)

This commit is contained in:
Will Browne
2021-08-25 10:08:48 +02:00
committed by GitHub
parent 84de946daa
commit 1618d5ad6f
6 changed files with 6 additions and 7 deletions
+1 -2
View File
@@ -1,7 +1,6 @@
package testdatasource
import (
"context"
"net/http"
"github.com/grafana/grafana-plugin-sdk-go/backend"
@@ -38,7 +37,7 @@ func (p *testDataPlugin) Init() error {
CallResourceHandler: httpadapter.New(resourceMux),
StreamHandler: newTestStreamHandler(p.logger),
})
err := p.BackendPluginManager.RegisterAndStart(context.Background(), "testdata", factory)
err := p.BackendPluginManager.Register("testdata", factory)
if err != nil {
p.logger.Error("Failed to register plugin", "error", err)
}