Skip to content

Commit 3e2fbf1

Browse files
authored
fix dep error (#110)
1 parent 9d14f6a commit 3e2fbf1

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pkg/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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
}

pkg/plugin/plugin.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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)

0 commit comments

Comments
 (0)