mirror of
https://github.com/giongto35/cloud-game.git
synced 2026-01-23 02:34:42 +00:00
Add version info into the apps (#330)
Both worker and coordinator display version number in the console during startup. Coordinator displays its version number in the top right corner of the index.html page.
This commit is contained in:
parent
cbabe69f30
commit
30d104ee98
8 changed files with 59 additions and 5 deletions
|
|
@ -16,6 +16,8 @@ import (
|
|||
flag "github.com/spf13/pflag"
|
||||
)
|
||||
|
||||
var Version = ""
|
||||
|
||||
func main() {
|
||||
rand.Seed(time.Now().UTC().UnixNano())
|
||||
|
||||
|
|
@ -28,6 +30,7 @@ func main() {
|
|||
|
||||
ctx, cancelCtx := context.WithCancel(context.Background())
|
||||
|
||||
glog.Infof("[coordinator] version: %v", Version)
|
||||
glog.Infof("Initializing coordinator server")
|
||||
glog.V(4).Infof("Coordinator configs %v", conf)
|
||||
o := coordinator.New(ctx, conf)
|
||||
|
|
|
|||
|
|
@ -17,6 +17,8 @@ import (
|
|||
flag "github.com/spf13/pflag"
|
||||
)
|
||||
|
||||
var Version = ""
|
||||
|
||||
func init() {
|
||||
rand.Seed(time.Now().UTC().UnixNano())
|
||||
}
|
||||
|
|
@ -31,6 +33,7 @@ func run() {
|
|||
|
||||
ctx, cancelCtx := context.WithCancel(context.Background())
|
||||
|
||||
glog.Infof("[worker] version: %v", Version)
|
||||
glog.V(4).Info("[worker] Initialization")
|
||||
glog.V(4).Infof("[worker] Local configuration %+v", conf)
|
||||
wrk := worker.New(ctx, conf)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue