Developing backend plugin (grafana-plugin-sdk-go)

Hi!
I am trying to implement a resource plugin (Grafana 6.7.3 / grafana-plugin-sdk-go 0.65.0).
I have copied source code from https://github.com/grafana/grafana-plugin-sdk-go/blob/v0.65.0/backend/datasource/serve_example_test.go
According to logs the plugin has been registered

t=2020-05-31T16:12:15+1000 lvl=dbug msg=“Serving plugin” logger=plugins.backend pluginId=backend-plugin plugins="[diagnostics resource data]"

But when I try to call /api/plugins/backend-plugin/resources/test I get error

‘t=2020-05-31T01:21:46+1000 lvl=eror msg=“Failed to receive response from resource call” logger=context userId=0 orgId=1 uname= error=“rpc error: code = Internal desc = grpc: failed to unmarshal the received messag
e unexpected EOF”’

Calling /api/datasources/66/resources/test produces another error

desc = grpc: failed to unmarshal the received messag
e proto: can’t skip unknown wire type 7

Has anyone faced this issue?
Perhaps there is a mismatch between Grafana version and grafana-plugin-sdk-go version.
But I have not found any note regarding versioning.

My mistake, I had to use grafana-plugin-sdk-go 0.30.0 to get it to work with Grafana 6.7.3.
Here you can find an example.

1 Like