Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Cmd = &cobra.Command{ Use: "start", Short: "mcenter API服务", Long: "mcenter API服务", RunE: func(cmd *cobra.Command, args []string) error { conf := conf.C() ch := make(chan os.Signal, 1) defer close(ch) signal.Notify(ch, syscall.SIGTERM, syscall.SIGINT, syscall.SIGHUP, syscall.SIGQUIT) svr, err := newService(conf) if err != nil { return err } go svr.waitSign(ch) if err := svr.start(); err != nil { if !strings.Contains(err.Error(), "http: Server closed") { return err } } return nil }, }
startCmd represents the start command
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.