From 8c5ce6279a89c99c94b76d7222f4462ae573a4f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Sw=C3=A4rd?= Date: Tue, 25 Jul 2023 12:35:47 +0200 Subject: [PATCH] Separate out grpc client to package local for notifications service. --- services/notifications/pkg/command/server.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/notifications/pkg/command/server.go b/services/notifications/pkg/command/server.go index 359106447..7d0e51512 100644 --- a/services/notifications/pkg/command/server.go +++ b/services/notifications/pkg/command/server.go @@ -46,7 +46,7 @@ func Server(cfg *config.Config) *cli.Command { return err } - err = grpc.Configure( + grpcClient, err := grpc.NewClient( append( grpc.GetClientOptions(&cfg.GRPCClientTLS), grpc.WithTraceProvider(traceProvider), @@ -149,7 +149,7 @@ func Server(cfg *config.Config) *cli.Command { if err != nil { logger.Fatal().Err(err).Str("addr", cfg.Notifications.RevaGateway).Msg("could not get reva gateway selector") } - valueService := settingssvc.NewValueService("com.owncloud.api.settings", grpc.DefaultClient()) + valueService := settingssvc.NewValueService("com.owncloud.api.settings", grpcClient) svc := service.NewEventsNotifier(evts, channel, logger, gatewaySelector, valueService, cfg.Notifications.MachineAuthAPIKey, cfg.Notifications.EmailTemplatePath, cfg.WebUIURL) gr.Add(svc.Run, func(error) {