MCPcopy
hub / github.com/opencloud-eu/opencloud / Server

Function Server

opencloud/pkg/command/server.go:14–28  ·  view source on GitHub ↗

Server is the entrypoint for the server command.

(cfg *config.Config)

Source from the content-addressed store, hash-verified

12
13// Server is the entrypoint for the server command.
14func Server(cfg *config.Config) *cobra.Command {
15 return &cobra.Command{
16 Use: "server",
17 Short: "start a fullstack server (runtime and all services in supervised mode)",
18 PreRunE: func(cmd *cobra.Command, args []string) error {
19 return configlog.ReturnError(parser.ParseConfig(cfg, false))
20 },
21 GroupID: CommandGroupServer,
22 RunE: func(cmd *cobra.Command, args []string) error {
23 // Prefer the in-memory registry as the default when running in single-binary mode
24 r := runtime.New(cfg)
25 return r.Start(cmd.Context())
26 },
27 }
28}
29
30func init() {
31 register.AddCommand(Server)

Callers

nothing calls this directly

Calls 4

ReturnErrorFunction · 0.92
ParseConfigFunction · 0.92
NewFunction · 0.92
StartMethod · 0.45

Tested by

no test coverage detected