Documentation
¶
Overview ¶
@Author: Ciusyan 2023/1/24
@Author: Ciusyan 2023/1/24
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var RootCmd = &cobra.Command{ Use: "Dousheng", Long: "dousheng API", Short: "dusheng API", Example: "dousheng cmd", RunE: func(cmd *cobra.Command, args []string) error { if vers { fmt.Println(version.FullVersion()) } return nil }, }
View Source
var StartCmd = &cobra.Command{ Use: "start", Long: "启动 Dousheng API服务", Short: "启动 Dousheng API服务", Example: "go run main start", RunE: func(cmd *cobra.Command, args []string) error { if err := conf.LoadConfigFromToml(configFile); err != nil { return err } if err := loadGlobalLogger(); err != nil { return err } apps.InitService() manager := NewManager() ch := make(chan os.Signal, 1) defer close(ch) signal.Notify(ch, syscall.SIGTERM, syscall.SIGQUIT, syscall.SIGHUP, syscall.SIGINT) go manager.WaitStop(ch) return manager.Start() }, }
Functions ¶
func NewManager ¶
func NewManager() *manager
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.