File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ func main() {
3131 // from Grafana to create different instances of SampleDatasource (per datasource
3232 // ID). When datasource configuration changed Dispose method will be called and
3333 // new datasource instance created using NewSampleDatasource factory.
34- if err := datasource .Manage ("googlecloud-logging-datasource" , plugin .NewCloudLoggingDatasource , datasource.ManageOpts {}); err != nil {
34+ if err := datasource .Manage ("googlecloud-logging-datasource" , datasource . InstanceFactoryFunc ( plugin .NewCloudLoggingDatasource ) , datasource.ManageOpts {}); err != nil {
3535 log .DefaultLogger .Error ("error running" , "error" , err .Error ())
3636 os .Exit (1 )
3737 }
Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ type serviceAccountJSON struct {
7878}
7979
8080// NewCloudLoggingDatasource creates a new datasource instance.
81- func NewCloudLoggingDatasource (settings backend.DataSourceInstanceSettings ) (instancemgmt.Instance , error ) {
81+ func NewCloudLoggingDatasource (ctx context. Context , settings backend.DataSourceInstanceSettings ) (instancemgmt.Instance , error ) {
8282 var conf config
8383 if err := json .Unmarshal (settings .JSONData , & conf ); err != nil {
8484 return nil , fmt .Errorf ("unmarshal: %w" , err )
You can’t perform that action at this time.
0 commit comments