Extract NewSearchOptions from unified sql client setup. (#100719)

* Extract NewSearchOptions from unified sql client setup.

Co-authored-by: Georges Chaudy <chaudyg@gmail.com>
This commit is contained in:
Peter Štibraný
2025-02-14 16:39:48 +01:00
committed by GitHub
co-authored by Georges Chaudy
parent 861686adaa
commit d0394bfa7e
4 changed files with 71 additions and 48 deletions
+6 -1
View File
@@ -23,6 +23,7 @@ import (
"github.com/grafana/grafana/pkg/storage/legacysql"
"github.com/grafana/grafana/pkg/storage/unified/federated"
"github.com/grafana/grafana/pkg/storage/unified/resource"
"github.com/grafana/grafana/pkg/storage/unified/search"
"github.com/grafana/grafana/pkg/storage/unified/sql"
)
@@ -121,7 +122,11 @@ func newClient(opts options.StorageOptions,
// Use the local SQL
default:
server, err := sql.NewResourceServer(ctx, db, cfg, features, docs, tracer, reg, authzc)
searchOptions, err := search.NewSearchOptions(features, cfg, tracer, docs, reg)
if err != nil {
return nil, err
}
server, err := sql.NewResourceServer(db, cfg, tracer, reg, authzc, searchOptions)
if err != nil {
return nil, err
}