DataSources: Add datasource fetching + querying interface (#80749)

* first pass

* separate oss + enterprise

* tidy things up

* add ctx

* fix tests

* use standalone svcs

* mv plugin context provide

* fix wire

* fix import
This commit is contained in:
Will Browne
2024-01-19 15:56:52 +01:00
committed by GitHub
parent bb0fa4f99a
commit 3f30cbf91c
21 changed files with 342 additions and 196 deletions

View File

@ -9,11 +9,17 @@ import (
"github.com/grafana/grafana/pkg/registry/apis/featuretoggle"
"github.com/grafana/grafana/pkg/registry/apis/folders"
"github.com/grafana/grafana/pkg/registry/apis/playlist"
"github.com/grafana/grafana/pkg/services/pluginsintegration/plugincontext"
)
var WireSet = wire.NewSet(
ProvideRegistryServiceSink, // dummy background service that forces registration
wire.Bind(new(datasource.QuerierProvider), new(*datasource.DefaultQuerierProvider)),
datasource.ProvideDefaultQuerierProvider,
plugincontext.ProvideService,
wire.Bind(new(datasource.PluginContextProvider), new(*plugincontext.Provider)),
// Each must be added here *and* in the ServiceSink above
playlist.RegisterAPIService,
dashboard.RegisterAPIService,