Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var RootCmd = &cobra.Command{ Use: "demo", Short: "demo 后端API", Long: "demo 后端api", RunE: func(cmd *cobra.Command, args []string) error { if vers { fmt.Println(version.FullVersion()) return nil } return nil }, }
View Source
var StartCmd = &cobra.Command{ Use: "start", Short: "启动后端api", Long: "启动后端api", RunE: func(cmd *cobra.Command, args []string) error { err := conf.LoadConfigFromToml(confFile) if err != nil { return err } if err := LoadGloabalLogger(); err != nil { return err } apps.InitImpl() svc := newManger() ch := make(chan os.Signal, 1) signal.Notify(ch, syscall.SIGTERM, syscall.SIGHUP, syscall.SIGINT, syscall.SIGQUIT) go svc.WaitGroup(ch) go svc.GrpcStart() go svc.RestfulStart() return svc.HttpStart() }, }
Functions ¶
func LoadGloabalLogger ¶
func LoadGloabalLogger() error
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.