added options to grpc init

This commit is contained in:
A.Unger
2020-02-04 12:37:23 +01:00
parent ed8b266bf8
commit 582170605f
3 changed files with 91 additions and 12 deletions
+8 -1
View File
@@ -43,7 +43,14 @@ func Server(cfg *config.Config) *cli.Command {
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
service := grpc.NewService(ctx, cfg)
service := grpc.NewService(
// TODO read all this from cfg
grpc.Context(ctx),
grpc.Config(cfg),
grpc.Name("accounts"),
grpc.Namespace("com.owncloud"),
grpc.Address("localhost:9999"),
)
gr.Add(func() error {
return service.Run()