Initial QSfera import

This commit is contained in:
Курнат Андрей
2026-06-07 10:20:04 +03:00
commit 2315f25754
16485 changed files with 4826827 additions and 0 deletions
+32
View File
@@ -0,0 +1,32 @@
package command
import (
"github.com/qsfera/server/qsfera/pkg/register"
"github.com/qsfera/server/qsfera/pkg/runtime"
"github.com/qsfera/server/pkg/config"
"github.com/qsfera/server/pkg/config/configlog"
"github.com/qsfera/server/pkg/config/parser"
"github.com/spf13/cobra"
)
// Server is the entrypoint for the server command.
func Server(cfg *config.Config) *cobra.Command {
return &cobra.Command{
Use: "server",
Short: "start a fullstack server (runtime and all services in supervised mode)",
PreRunE: func(cmd *cobra.Command, args []string) error {
return configlog.ReturnError(parser.ParseConfig(cfg, false))
},
GroupID: CommandGroupServer,
RunE: func(cmd *cobra.Command, args []string) error {
// Prefer the in-memory registry as the default when running in single-binary mode
r := runtime.New(cfg)
return r.Start(cmd.Context())
},
}
}
func init() {
register.AddCommand(Server)
}