add nats-js-kv connection to graph

Signed-off-by: Christian Richter <c.richter@opencloud.eu>

# Conflicts:
#	services/graph/pkg/service/v0/service.go
This commit is contained in:
Christian Richter
2025-10-08 16:45:16 +02:00
committed by Ralf Haferkamp
parent 63f976cac1
commit 07a9308c4c
6 changed files with 68 additions and 0 deletions
+13
View File
@@ -15,6 +15,10 @@ import (
"github.com/opencloud-eu/opencloud/services/graph/pkg/metrics"
"github.com/opencloud-eu/opencloud/services/graph/pkg/server/debug"
"github.com/opencloud-eu/opencloud/services/graph/pkg/server/http"
microstore "go-micro.dev/v4/store"
"github.com/opencloud-eu/reva/v2/pkg/store"
"github.com/urfave/cli/v2"
)
@@ -46,9 +50,18 @@ func Server(cfg *config.Config) *cli.Command {
gr := runner.NewGroup()
{
persistence := store.Create(
store.Store(cfg.Store.Store),
microstore.Nodes(cfg.Store.Nodes...),
microstore.Database(cfg.Store.Database),
microstore.Table(cfg.Store.Table),
store.Authentication(cfg.Store.AuthUsername, cfg.Store.AuthPassword),
)
server, err := http.Server(
http.Logger(logger),
http.Context(ctx),
http.Store(persistence),
http.Config(cfg),
http.Metrics(mtrcs),
http.TraceProvider(traceProvider),