mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-05-07 12:01:27 -05:00
POC: extensions promoting their own setting bundles onto the settings service
This commit is contained in:
@@ -9,6 +9,7 @@ import (
|
||||
"github.com/oklog/run"
|
||||
"github.com/owncloud/ocis-accounts/pkg/config"
|
||||
"github.com/owncloud/ocis-accounts/pkg/server/grpc"
|
||||
svc "github.com/owncloud/ocis-accounts/pkg/service/v0"
|
||||
oclog "github.com/owncloud/ocis-pkg/v2/log"
|
||||
)
|
||||
|
||||
@@ -65,7 +66,12 @@ func Server(cfg *config.Config) *cli.Command {
|
||||
},
|
||||
},
|
||||
Before: func(c *cli.Context) error {
|
||||
logger = oclog.NewLogger(oclog.Name(cfg.Server.Name))
|
||||
logger = oclog.NewLogger(
|
||||
oclog.Name(cfg.Server.Name),
|
||||
oclog.Level("info"),
|
||||
oclog.Color(true),
|
||||
oclog.Pretty(true),
|
||||
)
|
||||
return ParseConfig(c, cfg)
|
||||
},
|
||||
Action: func(c *cli.Context) error {
|
||||
@@ -83,6 +89,8 @@ func Server(cfg *config.Config) *cli.Command {
|
||||
)
|
||||
|
||||
gr.Add(func() error {
|
||||
logger.Info().Str("service", service.Name()).Msg("Reporting settings bundle to account service")
|
||||
go svc.ReportSettingsBundle(&logger)
|
||||
return service.Run()
|
||||
}, func(_ error) {
|
||||
fmt.Println("shutting down grpc server")
|
||||
|
||||
Reference in New Issue
Block a user