Chore: Remove dead code (#28664)
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
This commit is contained in:
+9
-1
@@ -2,6 +2,7 @@ package tsdb
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
"github.com/grafana/grafana/pkg/models"
|
||||
)
|
||||
@@ -9,7 +10,14 @@ import (
|
||||
type HandleRequestFunc func(ctx context.Context, dsInfo *models.DataSource, req *TsdbQuery) (*Response, error)
|
||||
|
||||
func HandleRequest(ctx context.Context, dsInfo *models.DataSource, req *TsdbQuery) (*Response, error) {
|
||||
endpoint, err := getTsdbQueryEndpointFor(dsInfo)
|
||||
var endpoint TsdbQueryEndpoint
|
||||
fn, exists := registry[dsInfo.Type]
|
||||
if !exists {
|
||||
return nil, fmt.Errorf("Could not find executor for data source type: %s", dsInfo.Type)
|
||||
}
|
||||
|
||||
var err error
|
||||
endpoint, err = fn(dsInfo)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user