1
This commit is contained in:
parent
2da787403d
commit
375d33c789
@ -3,5 +3,7 @@
|
||||
"port": 3306,
|
||||
"user": "root",
|
||||
"passwd": "keji178",
|
||||
"database": "bcnft_dev"
|
||||
"database": "bcnft_dev",
|
||||
"max_open_conns": 1,
|
||||
"max_idle_conns": 1
|
||||
}
|
||||
|
@ -3,5 +3,7 @@
|
||||
"port": 3306,
|
||||
"user": "root",
|
||||
"passwd": "keji178",
|
||||
"database": "gamedb2006_dev_1"
|
||||
"database": "gamedb2006_dev_1",
|
||||
"max_open_conns": 1,
|
||||
"max_idle_conns": 1
|
||||
}
|
||||
|
@ -3,5 +3,7 @@
|
||||
"port": 3306,
|
||||
"user": "root",
|
||||
"passwd": "keji178",
|
||||
"database": "maildb_dev_1"
|
||||
"database": "maildb_dev_1",
|
||||
"max_open_conns": 1,
|
||||
"max_idle_conns": 1
|
||||
}
|
||||
|
@ -48,7 +48,9 @@ func (this *app) registerDataSources() {
|
||||
mt.Table.MailDb.GetById(0).GetUser(),
|
||||
mt.Table.MailDb.GetById(0).GetPasswd(),
|
||||
mt.Table.MailDb.GetById(0).GetDatabase(),
|
||||
1)
|
||||
1,
|
||||
mt.Table.MailDb.GetById(0).GetMaxOpenConns(),
|
||||
mt.Table.MailDb.GetById(0).GetMaxIdleConns())
|
||||
|
||||
f5.GetGoStyleDb().RegisterDataSource(
|
||||
constant.GAME_DB,
|
||||
@ -57,7 +59,9 @@ func (this *app) registerDataSources() {
|
||||
mt.Table.GameDb.GetById(0).GetUser(),
|
||||
mt.Table.GameDb.GetById(0).GetPasswd(),
|
||||
mt.Table.GameDb.GetById(0).GetDatabase(),
|
||||
1)
|
||||
1,
|
||||
mt.Table.GameDb.GetById(0).GetMaxOpenConns(),
|
||||
mt.Table.GameDb.GetById(0).GetMaxIdleConns())
|
||||
|
||||
f5.GetGoStyleDb().RegisterDataSource(
|
||||
constant.BCNFT_DB,
|
||||
@ -66,7 +70,9 @@ func (this *app) registerDataSources() {
|
||||
mt.Table.BcNftDb.GetById(0).GetUser(),
|
||||
mt.Table.BcNftDb.GetById(0).GetPasswd(),
|
||||
mt.Table.BcNftDb.GetById(0).GetDatabase(),
|
||||
1)
|
||||
1,
|
||||
mt.Table.BcNftDb.GetById(0).GetMaxOpenConns(),
|
||||
mt.Table.BcNftDb.GetById(0).GetMaxIdleConns())
|
||||
|
||||
f5.GetGoStyleDb().RegisterDataSource(
|
||||
constant.BCEVENT_DB,
|
||||
@ -75,7 +81,9 @@ func (this *app) registerDataSources() {
|
||||
mt.Table.BcEventDb.GetById(0).GetUser(),
|
||||
mt.Table.BcEventDb.GetById(0).GetPasswd(),
|
||||
mt.Table.BcEventDb.GetById(0).GetDatabase(),
|
||||
1)
|
||||
1,
|
||||
mt.Table.BcEventDb.GetById(0).GetMaxOpenConns(),
|
||||
mt.Table.BcEventDb.GetById(0).GetMaxIdleConns())
|
||||
|
||||
}
|
||||
|
||||
|
@ -19,6 +19,8 @@ type GameDb struct {
|
||||
user string
|
||||
passwd string
|
||||
database string
|
||||
max_open_conns int32
|
||||
max_idle_conns int32
|
||||
|
||||
_flags1_ uint64
|
||||
_flags2_ uint64
|
||||
@ -30,6 +32,8 @@ type MailDb struct {
|
||||
user string
|
||||
passwd string
|
||||
database string
|
||||
max_open_conns int32
|
||||
max_idle_conns int32
|
||||
|
||||
_flags1_ uint64
|
||||
_flags2_ uint64
|
||||
@ -41,6 +45,8 @@ type BcNftDb struct {
|
||||
user string
|
||||
passwd string
|
||||
database string
|
||||
max_open_conns int32
|
||||
max_idle_conns int32
|
||||
|
||||
_flags1_ uint64
|
||||
_flags2_ uint64
|
||||
@ -52,6 +58,8 @@ type BcEventDb struct {
|
||||
user string
|
||||
passwd string
|
||||
database string
|
||||
max_open_conns int32
|
||||
max_idle_conns int32
|
||||
|
||||
_flags1_ uint64
|
||||
_flags2_ uint64
|
||||
@ -169,6 +177,22 @@ func (this *GameDb) HasDatabase() bool {
|
||||
return (this._flags1_ & (uint64(1) << 5)) > 0
|
||||
}
|
||||
|
||||
func (this *GameDb) GetMaxOpenConns() int32 {
|
||||
return this.max_open_conns
|
||||
}
|
||||
|
||||
func (this *GameDb) HasMaxOpenConns() bool {
|
||||
return (this._flags1_ & (uint64(1) << 6)) > 0
|
||||
}
|
||||
|
||||
func (this *GameDb) GetMaxIdleConns() int32 {
|
||||
return this.max_idle_conns
|
||||
}
|
||||
|
||||
func (this *GameDb) HasMaxIdleConns() bool {
|
||||
return (this._flags1_ & (uint64(1) << 7)) > 0
|
||||
}
|
||||
|
||||
func (this *MailDb) GetHost() string {
|
||||
return this.host
|
||||
}
|
||||
@ -209,6 +233,22 @@ func (this *MailDb) HasDatabase() bool {
|
||||
return (this._flags1_ & (uint64(1) << 5)) > 0
|
||||
}
|
||||
|
||||
func (this *MailDb) GetMaxOpenConns() int32 {
|
||||
return this.max_open_conns
|
||||
}
|
||||
|
||||
func (this *MailDb) HasMaxOpenConns() bool {
|
||||
return (this._flags1_ & (uint64(1) << 6)) > 0
|
||||
}
|
||||
|
||||
func (this *MailDb) GetMaxIdleConns() int32 {
|
||||
return this.max_idle_conns
|
||||
}
|
||||
|
||||
func (this *MailDb) HasMaxIdleConns() bool {
|
||||
return (this._flags1_ & (uint64(1) << 7)) > 0
|
||||
}
|
||||
|
||||
func (this *BcNftDb) GetHost() string {
|
||||
return this.host
|
||||
}
|
||||
@ -249,6 +289,22 @@ func (this *BcNftDb) HasDatabase() bool {
|
||||
return (this._flags1_ & (uint64(1) << 5)) > 0
|
||||
}
|
||||
|
||||
func (this *BcNftDb) GetMaxOpenConns() int32 {
|
||||
return this.max_open_conns
|
||||
}
|
||||
|
||||
func (this *BcNftDb) HasMaxOpenConns() bool {
|
||||
return (this._flags1_ & (uint64(1) << 6)) > 0
|
||||
}
|
||||
|
||||
func (this *BcNftDb) GetMaxIdleConns() int32 {
|
||||
return this.max_idle_conns
|
||||
}
|
||||
|
||||
func (this *BcNftDb) HasMaxIdleConns() bool {
|
||||
return (this._flags1_ & (uint64(1) << 7)) > 0
|
||||
}
|
||||
|
||||
func (this *BcEventDb) GetHost() string {
|
||||
return this.host
|
||||
}
|
||||
@ -289,6 +345,22 @@ func (this *BcEventDb) HasDatabase() bool {
|
||||
return (this._flags1_ & (uint64(1) << 5)) > 0
|
||||
}
|
||||
|
||||
func (this *BcEventDb) GetMaxOpenConns() int32 {
|
||||
return this.max_open_conns
|
||||
}
|
||||
|
||||
func (this *BcEventDb) HasMaxOpenConns() bool {
|
||||
return (this._flags1_ & (uint64(1) << 6)) > 0
|
||||
}
|
||||
|
||||
func (this *BcEventDb) GetMaxIdleConns() int32 {
|
||||
return this.max_idle_conns
|
||||
}
|
||||
|
||||
func (this *BcEventDb) HasMaxIdleConns() bool {
|
||||
return (this._flags1_ & (uint64(1) << 7)) > 0
|
||||
}
|
||||
|
||||
func (this *Config) GetGameapiUrl() string {
|
||||
return this.gameapi_url
|
||||
}
|
||||
@ -446,6 +518,8 @@ func (this *GameDb) LoadFromKv(kv map[string]interface{}) {
|
||||
f5.ReadMetaTableField(&this.user, "user", &this._flags1_, 3, kv)
|
||||
f5.ReadMetaTableField(&this.passwd, "passwd", &this._flags1_, 4, kv)
|
||||
f5.ReadMetaTableField(&this.database, "database", &this._flags1_, 5, kv)
|
||||
f5.ReadMetaTableField(&this.max_open_conns, "max_open_conns", &this._flags1_, 6, kv)
|
||||
f5.ReadMetaTableField(&this.max_idle_conns, "max_idle_conns", &this._flags1_, 7, kv)
|
||||
}
|
||||
|
||||
func (this *MailDb) LoadFromKv(kv map[string]interface{}) {
|
||||
@ -454,6 +528,8 @@ func (this *MailDb) LoadFromKv(kv map[string]interface{}) {
|
||||
f5.ReadMetaTableField(&this.user, "user", &this._flags1_, 3, kv)
|
||||
f5.ReadMetaTableField(&this.passwd, "passwd", &this._flags1_, 4, kv)
|
||||
f5.ReadMetaTableField(&this.database, "database", &this._flags1_, 5, kv)
|
||||
f5.ReadMetaTableField(&this.max_open_conns, "max_open_conns", &this._flags1_, 6, kv)
|
||||
f5.ReadMetaTableField(&this.max_idle_conns, "max_idle_conns", &this._flags1_, 7, kv)
|
||||
}
|
||||
|
||||
func (this *BcNftDb) LoadFromKv(kv map[string]interface{}) {
|
||||
@ -462,6 +538,8 @@ func (this *BcNftDb) LoadFromKv(kv map[string]interface{}) {
|
||||
f5.ReadMetaTableField(&this.user, "user", &this._flags1_, 3, kv)
|
||||
f5.ReadMetaTableField(&this.passwd, "passwd", &this._flags1_, 4, kv)
|
||||
f5.ReadMetaTableField(&this.database, "database", &this._flags1_, 5, kv)
|
||||
f5.ReadMetaTableField(&this.max_open_conns, "max_open_conns", &this._flags1_, 6, kv)
|
||||
f5.ReadMetaTableField(&this.max_idle_conns, "max_idle_conns", &this._flags1_, 7, kv)
|
||||
}
|
||||
|
||||
func (this *BcEventDb) LoadFromKv(kv map[string]interface{}) {
|
||||
@ -470,6 +548,8 @@ func (this *BcEventDb) LoadFromKv(kv map[string]interface{}) {
|
||||
f5.ReadMetaTableField(&this.user, "user", &this._flags1_, 3, kv)
|
||||
f5.ReadMetaTableField(&this.passwd, "passwd", &this._flags1_, 4, kv)
|
||||
f5.ReadMetaTableField(&this.database, "database", &this._flags1_, 5, kv)
|
||||
f5.ReadMetaTableField(&this.max_open_conns, "max_open_conns", &this._flags1_, 6, kv)
|
||||
f5.ReadMetaTableField(&this.max_idle_conns, "max_idle_conns", &this._flags1_, 7, kv)
|
||||
}
|
||||
|
||||
func (this *Config) LoadFromKv(kv map[string]interface{}) {
|
||||
|
@ -16,6 +16,8 @@ message GameDb
|
||||
optional string user = 3;
|
||||
optional string passwd = 4;
|
||||
optional string database = 5;
|
||||
optional int32 max_open_conns = 6;
|
||||
optional int32 max_idle_conns = 7;
|
||||
}
|
||||
|
||||
message MailDb
|
||||
@ -25,6 +27,8 @@ message MailDb
|
||||
optional string user = 3;
|
||||
optional string passwd = 4;
|
||||
optional string database = 5;
|
||||
optional int32 max_open_conns = 6;
|
||||
optional int32 max_idle_conns = 7;
|
||||
}
|
||||
|
||||
message BcNftDb
|
||||
@ -34,6 +38,8 @@ message BcNftDb
|
||||
optional string user = 3;
|
||||
optional string passwd = 4;
|
||||
optional string database = 5;
|
||||
optional int32 max_open_conns = 6;
|
||||
optional int32 max_idle_conns = 7;
|
||||
}
|
||||
|
||||
message BcEventDb
|
||||
@ -43,6 +49,8 @@ message BcEventDb
|
||||
optional string user = 3;
|
||||
optional string passwd = 4;
|
||||
optional string database = 5;
|
||||
optional int32 max_open_conns = 6;
|
||||
optional int32 max_idle_conns = 7;
|
||||
}
|
||||
|
||||
message Config
|
||||
|
@ -1,7 +1,7 @@
|
||||
compile:
|
||||
cd adminserver && make
|
||||
cd gamelog && make
|
||||
cd gameservice && make
|
||||
cd backtask && make
|
||||
cd gateserver && make
|
||||
cd hallserver && make
|
||||
cd imserver && make
|
||||
|
Loading…
x
Reference in New Issue
Block a user