Replacing implicit grpc client initialization with explicit package local variables.

This commit is contained in:
Daniel Swärd
2023-07-31 12:57:59 +02:00
parent 82045b8850
commit 6a5e21eff4
26 changed files with 33 additions and 115 deletions
-5
View File
@@ -5,7 +5,6 @@ import (
"github.com/owncloud/ocis/v2/ocis-pkg/config/configlog"
"github.com/owncloud/ocis/v2/ocis-pkg/config/parser"
"github.com/owncloud/ocis/v2/ocis-pkg/registry"
"github.com/owncloud/ocis/v2/ocis-pkg/service/grpc"
"github.com/owncloud/ocis/v2/ocis/pkg/register"
"github.com/owncloud/ocis/v2/ocis/pkg/runtime"
"github.com/urfave/cli/v2"
@@ -23,10 +22,6 @@ func Server(cfg *config.Config) *cli.Command {
Action: func(c *cli.Context) error {
// Prefer the in-memory registry as the default when running in single-binary mode
registry.Configure("memory")
err := grpc.Configure(grpc.GetClientOptions(cfg.GRPCClientTLS)...)
if err != nil {
return err
}
r := runtime.New(cfg)
return r.Start()
},