K8s/Testdata: Expose testdata in standalone apiserver (#80248)

This commit is contained in:
Ryan McKinley
2024-01-10 17:45:23 +02:00
committed by GitHub
parent 42f1059bc9
commit 6be6724433
9 changed files with 93 additions and 24 deletions
@@ -9,9 +9,13 @@ import (
"github.com/grafana/grafana-plugin-sdk-go/backend/log"
"github.com/grafana/grafana-plugin-sdk-go/backend/resource/httpadapter"
"github.com/grafana/grafana-plugin-sdk-go/data"
"github.com/grafana/grafana/pkg/tsdb/grafana-testdata-datasource/sims"
)
// ensures that testdata implements all client functions
// var _ plugins.Client = &Service{}
func ProvideService() *Service {
s := &Service{
queryMux: datasource.NewQueryTypeMux(),
@@ -66,3 +70,8 @@ func (s *Service) CheckHealth(_ context.Context, _ *backend.CheckHealthRequest)
Message: "Data source is working",
}, nil
}
// CollectMetricsHandler handles metric collection.
func (s *Service) CollectMetrics(ctx context.Context, req *backend.CollectMetricsRequest) (*backend.CollectMetricsResult, error) {
return nil, nil
}