Merge branch 'dev' of http://git.legu.cc/liwei_3d/go_dreamfactory into platform_10.0.0.7

This commit is contained in:
liwei 2022-09-22 11:07:56 +08:00
commit 2d5612d0af
2 changed files with 13 additions and 2 deletions

View File

@ -3,6 +3,9 @@ package comm
//游戏区服配置
type GameConfig struct {
AreaId string //区服id 每个区服id都必须是唯一
AreaName string //区服名
OpenServiceTime string //开服时间
Channel string //渠道
Loglevel int32 //日志文件输出级别
MaxAgeTime int32 //日志文件保存时长
ConsulAddr []string //区服Consul

View File

@ -50,6 +50,14 @@ var stopCmd = &cobra.Command{
stop()
},
}
var restart = &cobra.Command{
Use: "restart",
Short: "重启服务",
Run: func(cmd *cobra.Command, args []string) {
stop()
start()
},
}
func emptyRun(*cobra.Command, []string) {}
@ -65,7 +73,7 @@ func init() {
RootCmd.PersistentFlags().StringVarP(&gmpath, "gm", "g", "./gm.json", "游戏区服配置")
RootCmd.PersistentFlags().StringVarP(&crosspath, "cross", "c", "./cross.json", "游戏跨服配置")
RootCmd.PersistentFlags().StringVarP(&sid, "sid", "i", "", "区服id")
RootCmd.AddCommand(confCmd, startCmd, stopCmd)
RootCmd.AddCommand(confCmd, startCmd, stopCmd, restart)
}
func main() {