mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-01-04 11:19:39 -06:00
rename default services
This commit is contained in:
@@ -76,6 +76,7 @@ func Execute() error {
|
||||
},
|
||||
}
|
||||
|
||||
// Load commands from the registry
|
||||
for _, fn := range register.Commands {
|
||||
app.Commands = append(
|
||||
app.Commands,
|
||||
@@ -83,11 +84,7 @@ func Execute() error {
|
||||
)
|
||||
}
|
||||
|
||||
runtime.AddRuntime(app)
|
||||
app.Commands = append(
|
||||
app.Commands,
|
||||
runtime.Command(app),
|
||||
)
|
||||
runtime.AddMicroPlatform(app)
|
||||
|
||||
cli.HelpFlag = &cli.BoolFlag{
|
||||
Name: "help,h",
|
||||
@@ -102,7 +99,7 @@ func Execute() error {
|
||||
return app.Run(os.Args)
|
||||
}
|
||||
|
||||
// NewLogger initializes a service-specific logger instance.
|
||||
// NewLogger initializes a service-specific logger instance
|
||||
func NewLogger(cfg *config.Config) log.Logger {
|
||||
return log.NewLogger(
|
||||
log.Name("ocis"),
|
||||
|
||||
@@ -36,15 +36,12 @@ func Server(cfg *config.Config) *cli.Command {
|
||||
}
|
||||
|
||||
runtime := runtime.New(
|
||||
runtime.Services(append(runtime.RuntimeServices, runtime.Extensions...)),
|
||||
runtime.Services(append(runtime.MicroServices, runtime.Extensions...)),
|
||||
runtime.Logger(logger),
|
||||
runtime.MicroRuntime(cmd.DefaultCmd.Options().Runtime),
|
||||
)
|
||||
|
||||
// fork uses the micro runtime to fork go-micro services
|
||||
runtime.Start()
|
||||
|
||||
// trap blocks until a kill signal is sent
|
||||
runtime.Trap()
|
||||
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user