UnifiedSearch: Introduce a DocumentBuilder interface (#96738)

This commit is contained in:
Ryan McKinley
2024-11-21 07:53:25 +02:00
committed by GitHub
parent 8d4db7ac85
commit 0cb6c3d7bf
24 changed files with 1428 additions and 8 deletions
+8 -2
View File
@@ -3,10 +3,11 @@ package sql
import (
"context"
"github.com/grafana/dskit/services"
"github.com/prometheus/client_golang/prometheus"
"google.golang.org/grpc/health/grpc_health_v1"
"github.com/grafana/dskit/services"
infraDB "github.com/grafana/grafana/pkg/infra/db"
"github.com/grafana/grafana/pkg/infra/log"
"github.com/grafana/grafana/pkg/infra/tracing"
@@ -19,6 +20,7 @@ import (
"github.com/grafana/grafana/pkg/setting"
"github.com/grafana/grafana/pkg/storage/unified/resource"
"github.com/grafana/grafana/pkg/storage/unified/resource/grpc"
"github.com/grafana/grafana/pkg/storage/unified/search"
)
var (
@@ -99,7 +101,11 @@ func (s *service) start(ctx context.Context) error {
return err
}
server, err := NewResourceServer(ctx, s.db, s.cfg, s.features, s.tracing, s.reg, authzClient)
// TODO, for standalone this will need to be started from enterprise
// Connecting to the correct remote services
docs := search.ProvideDocumentBuilders()
server, err := NewResourceServer(ctx, s.db, s.cfg, s.features, docs, s.tracing, s.reg, authzClient)
if err != nil {
return err
}