mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-05-04 01:39:16 -05:00
restructure runtime code
This commit is contained in:
+1
-1
@@ -7,8 +7,8 @@ import (
|
||||
"github.com/owncloud/ocis-pkg/v2/log"
|
||||
"github.com/owncloud/ocis/pkg/config"
|
||||
"github.com/owncloud/ocis/pkg/flagset"
|
||||
"github.com/owncloud/ocis/pkg/micro/runtime"
|
||||
"github.com/owncloud/ocis/pkg/register"
|
||||
"github.com/owncloud/ocis/pkg/runtime"
|
||||
"github.com/owncloud/ocis/pkg/version"
|
||||
)
|
||||
|
||||
|
||||
@@ -8,8 +8,8 @@ import (
|
||||
"github.com/micro/cli/v2"
|
||||
"github.com/owncloud/ocis/pkg/config"
|
||||
"github.com/owncloud/ocis/pkg/flagset"
|
||||
"github.com/owncloud/ocis/pkg/micro/runtime"
|
||||
"github.com/owncloud/ocis/pkg/register"
|
||||
"github.com/owncloud/ocis/pkg/runtime"
|
||||
"github.com/owncloud/ocis/pkg/tracing"
|
||||
)
|
||||
|
||||
|
||||
@@ -6,11 +6,10 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/micro/cli/v2"
|
||||
"github.com/micro/go-micro/v2/config/cmd"
|
||||
"github.com/owncloud/ocis/pkg/config"
|
||||
"github.com/owncloud/ocis/pkg/flagset"
|
||||
"github.com/owncloud/ocis/pkg/micro/runtime"
|
||||
"github.com/owncloud/ocis/pkg/register"
|
||||
"github.com/owncloud/ocis/pkg/runtime"
|
||||
"github.com/owncloud/ocis/pkg/tracing"
|
||||
)
|
||||
|
||||
@@ -39,19 +38,11 @@ func Simple(cfg *config.Config) *cli.Command {
|
||||
return nil
|
||||
},
|
||||
Action: func(c *cli.Context) error {
|
||||
logger := NewLogger(cfg)
|
||||
|
||||
if err := tracing.Start(cfg); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
runtime := runtime.New(
|
||||
runtime.Logger(logger),
|
||||
runtime.Services(append(runtime.MicroServices, SimpleRuntimeServices...)),
|
||||
runtime.MicroRuntime(cmd.DefaultCmd.Options().Runtime),
|
||||
runtime.Context(c),
|
||||
)
|
||||
|
||||
runtime := runtime.New()
|
||||
runtime.Start()
|
||||
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user