From cb3516a706344d7e9bb5fe016fb6715d5e14f3cc Mon Sep 17 00:00:00 2001 From: "A.Unger" Date: Tue, 4 Feb 2020 11:55:25 +0100 Subject: [PATCH] injected config down the tree --- pkg/micro/grpc/grpc.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/micro/grpc/grpc.go b/pkg/micro/grpc/grpc.go index 5676a56a90..be538834cb 100644 --- a/pkg/micro/grpc/grpc.go +++ b/pkg/micro/grpc/grpc.go @@ -10,7 +10,7 @@ import ( ) // NewService creates a grpc service -func NewService(c context.Context) grpc.Service { +func NewService(c context.Context, cfg *config.Config) grpc.Service { service := grpc.NewService( // TODO options come from configuration grpc.Name("accounts"), @@ -19,7 +19,7 @@ func NewService(c context.Context) grpc.Service { grpc.Context(c), ) - hdlr := svc.New(config.New()) + hdlr := svc.New(cfg) proto.RegisterSettingsServiceHandler(service.Server(), hdlr) service.Init()