K8s/DataSource: Introduce PluginConfigProvider (#80928)

This commit is contained in:
Ryan McKinley
2024-01-22 11:32:25 -08:00
committed by GitHub
parent ce84f7c540
commit c7c594dba0
10 changed files with 251 additions and 221 deletions
+2 -2
View File
@@ -71,7 +71,7 @@ func (r *subQueryREST) readQueries(req *http.Request) ([]backend.DataQuery, erro
}
func (r *subQueryREST) Connect(ctx context.Context, name string, opts runtime.Object, responder rest.Responder) (http.Handler, error) {
pluginCtx, err := r.builder.pluginContext.PluginContextForDataSource(ctx, r.builder.pluginJSON.ID, name)
pluginCtx, err := r.builder.getPluginContext(ctx, name)
if err != nil {
return nil, err
}
@@ -83,7 +83,7 @@ func (r *subQueryREST) Connect(ctx context.Context, name string, opts runtime.Ob
return
}
queryResponse, err := r.builder.querier.Query(ctx, &backend.QueryDataRequest{
queryResponse, err := r.builder.client.QueryData(ctx, &backend.QueryDataRequest{
PluginContext: pluginCtx,
Queries: queries,
// Headers: // from context