mirror of
https://github.com/grafana/grafana.git
synced 2025-07-29 23:52:19 +08:00

* datasources: querier: more robust error handling, and report no error for st * do not leak error details out * apply the change to the real file, not just to the test
22 lines
778 B
Go
22 lines
778 B
Go
package query
|
|
|
|
import (
|
|
"context"
|
|
|
|
data "github.com/grafana/grafana-plugin-sdk-go/experimental/apis/data/v0alpha1"
|
|
"github.com/grafana/grafana/pkg/registry/apis/query/clientapi"
|
|
)
|
|
|
|
type CommonDataSourceClientSupplier struct {
|
|
Client clientapi.QueryDataClient
|
|
}
|
|
|
|
func (s *CommonDataSourceClientSupplier) GetDataSourceClient(_ context.Context, _ data.DataSourceRef, _ map[string]string, _ clientapi.InstanceConfigurationSettings) (clientapi.QueryDataClient, error) {
|
|
return s.Client, nil
|
|
}
|
|
|
|
func (s *CommonDataSourceClientSupplier) GetInstanceConfigurationSettings(_ context.Context) (clientapi.InstanceConfigurationSettings, error) {
|
|
// FIXME: for now it's an empty structure, we'll find a way to fill it correctly.
|
|
return clientapi.InstanceConfigurationSettings{}, nil
|
|
}
|