增加服务端版本
This commit is contained in:
parent
6c95148a63
commit
2ff05589c5
@ -50,6 +50,7 @@ var Server struct {
|
|||||||
Partition int
|
Partition int
|
||||||
KafkaHost string
|
KafkaHost string
|
||||||
KafkaPort string
|
KafkaPort string
|
||||||
|
Version string
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
|||||||
@ -33,5 +33,6 @@
|
|||||||
"RemoteAddr":"host.docker.internal:9001",
|
"RemoteAddr":"host.docker.internal:9001",
|
||||||
"Partition":3,
|
"Partition":3,
|
||||||
"KafkaHost":"kafka-server-2",
|
"KafkaHost":"kafka-server-2",
|
||||||
"KafkaPort":"9092"
|
"KafkaPort":"9092",
|
||||||
|
"Version":"1.0.0"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -5,6 +5,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"runtime"
|
"runtime"
|
||||||
"server/GoUtil"
|
"server/GoUtil"
|
||||||
|
"server/conf"
|
||||||
Msg "server/game/mod/msg"
|
Msg "server/game/mod/msg"
|
||||||
"server/gamedata"
|
"server/gamedata"
|
||||||
"server/msg"
|
"server/msg"
|
||||||
@ -105,6 +106,7 @@ func ReqServerInfo(args []interface{}) error {
|
|||||||
if err == nil && len(cpuPercent) > 0 {
|
if err == nil && len(cpuPercent) > 0 {
|
||||||
res["CPU"] = fmt.Sprintf("%.2f%%", cpuPercent[0])
|
res["CPU"] = fmt.Sprintf("%.2f%%", cpuPercent[0])
|
||||||
}
|
}
|
||||||
|
res["Version"] = conf.Server.Version
|
||||||
AdminPlayerBack(a, res)
|
AdminPlayerBack(a, res)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user