mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
TSDB: add deprecation comments to many tsdb structs (#33281)
This commit is contained in:
@@ -21,6 +21,7 @@ func init() {
|
||||
}
|
||||
|
||||
// Query builds flux queries, executes them, and returns the results.
|
||||
//nolint: staticcheck // plugins.DataQuery deprecated
|
||||
func Query(ctx context.Context, dsInfo *models.DataSource, tsdbQuery plugins.DataQuery) (
|
||||
plugins.DataResponse, error) {
|
||||
glog.Debug("Received a query", "query", tsdbQuery)
|
||||
@@ -98,6 +99,7 @@ func runnerFromDataSource(dsInfo *models.DataSource) (*runner, error) {
|
||||
// backendDataResponseToDataResponse takes the SDK's style response and changes it into a
|
||||
// plugins.DataQueryResult. This is a wrapper so less of existing code needs to be changed. This should
|
||||
// be able to be removed in the near future https://github.com/grafana/grafana/pull/25472.
|
||||
//nolint: staticcheck // plugins.DataQueryResult deprecated
|
||||
func backendDataResponseToDataResponse(dr *backend.DataResponse, refID string) plugins.DataQueryResult {
|
||||
qr := plugins.DataQueryResult{
|
||||
RefID: refID,
|
||||
|
@@ -22,6 +22,7 @@ type Executor struct {
|
||||
ResponseParser *ResponseParser
|
||||
}
|
||||
|
||||
//nolint: staticcheck // plugins.DataPlugin deprecated
|
||||
func NewExecutor(*models.DataSource) (plugins.DataPlugin, error) {
|
||||
return &Executor{
|
||||
QueryParser: &InfluxdbQueryParser{},
|
||||
@@ -39,6 +40,7 @@ func init() {
|
||||
glog = log.New("tsdb.influxdb")
|
||||
}
|
||||
|
||||
//nolint: staticcheck // plugins.DataResponse deprecated
|
||||
func (e *Executor) DataQuery(ctx context.Context, dsInfo *models.DataSource, tsdbQuery plugins.DataQuery) (
|
||||
plugins.DataResponse, error) {
|
||||
glog.Debug("Received a query request", "numQueries", len(tsdbQuery.Queries))
|
||||
|
@@ -23,6 +23,7 @@ func init() {
|
||||
legendFormat = regexp.MustCompile(`\[\[([\@\/\w-]+)(\.[\@\/\w-]+)*\]\]*|\$\s*([\@\/\w-]+?)*`)
|
||||
}
|
||||
|
||||
// nolint:staticcheck // plugins.DataQueryResult deprecated
|
||||
func (rp *ResponseParser) Parse(buf io.ReadCloser, query *Query) plugins.DataQueryResult {
|
||||
var queryRes plugins.DataQueryResult
|
||||
|
||||
|
@@ -17,12 +17,14 @@ func prepare(text string) io.ReadCloser {
|
||||
return ioutil.NopCloser(strings.NewReader(text))
|
||||
}
|
||||
|
||||
// nolint:staticcheck // plugins.DataQueryResult deprecated
|
||||
func decodedFrames(t *testing.T, result plugins.DataQueryResult) data.Frames {
|
||||
decoded, err := result.Dataframes.Decoded()
|
||||
require.NoError(t, err)
|
||||
return decoded
|
||||
}
|
||||
|
||||
// nolint:staticcheck // plugins.DataQueryResult deprecated
|
||||
func assertSeriesName(t *testing.T, result plugins.DataQueryResult, index int, name string) {
|
||||
decoded := decodedFrames(t, result)
|
||||
|
||||
|
Reference in New Issue
Block a user