mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-04-26 05:58:27 -05:00
Merge pull request #840 from owncloud/ocis-1018
Tweak go-micro behavior
This commit is contained in:
@@ -4,8 +4,13 @@ import (
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"github.com/owncloud/ocis/ocis-pkg/registry"
|
||||
|
||||
"github.com/micro/go-micro/v2"
|
||||
|
||||
"github.com/micro/cli/v2"
|
||||
"github.com/owncloud/ocis/ocis-pkg/log"
|
||||
|
||||
"github.com/owncloud/ocis/ocis/pkg/config"
|
||||
"github.com/owncloud/ocis/ocis/pkg/flagset"
|
||||
"github.com/owncloud/ocis/ocis/pkg/register"
|
||||
@@ -14,7 +19,7 @@ import (
|
||||
"github.com/spf13/viper"
|
||||
)
|
||||
|
||||
// Execute is the entry point for the ocis-ocis command.
|
||||
// Execute is the entry point for the ocis command.
|
||||
func Execute() error {
|
||||
cfg := config.New()
|
||||
|
||||
@@ -44,7 +49,13 @@ func Execute() error {
|
||||
)
|
||||
}
|
||||
|
||||
runtime.AddMicroPlatform(app)
|
||||
r := *registry.GetRegistry()
|
||||
|
||||
opts := micro.Options{
|
||||
Registry: r,
|
||||
}
|
||||
|
||||
runtime.AddMicroPlatform(app, opts)
|
||||
|
||||
cli.HelpFlag = &cli.BoolFlag{
|
||||
Name: "help,h",
|
||||
|
||||
@@ -32,7 +32,7 @@ func Server(cfg *config.Config) *cli.Command {
|
||||
return err
|
||||
}
|
||||
|
||||
r := runtime.New()
|
||||
r := runtime.New(cfg)
|
||||
return r.Start()
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user