game_sync/robot/base/config.go

37 lines
713 B
Go

package base
import (
"mongo.games.com/goserver/core"
"mongo.games.com/goserver/core/logger"
"mongo.games.com/goserver/core/netlib"
)
var Config = &Configuration{}
type Configuration struct {
Count int // 机器人总数
MatchCount int // 比赛机器人总数
AppId string // appID
Connects netlib.SessionConfig // 网络连接配置
}
func (this *Configuration) Name() string {
return "benchmark"
}
func (this *Configuration) Init() error {
logger.Logger.Tracef("%+v", *this)
if this.Count == 0 {
this.Count = 20
}
return nil
}
func (this *Configuration) Close() error {
return nil
}
func init() {
core.RegistePackage(Config)
}