1
This commit is contained in:
parent
a0765c24e5
commit
cd8b351455
19
server/adminserver/mt/Web3ServiceCluster.go
Normal file
19
server/adminserver/mt/Web3ServiceCluster.go
Normal file
@ -0,0 +1,19 @@
|
||||
package mt
|
||||
|
||||
import (
|
||||
"f5"
|
||||
"mtb"
|
||||
)
|
||||
|
||||
type Web3ServiceCluster struct {
|
||||
mtb.Web3ServiceCluster
|
||||
}
|
||||
|
||||
type Web3ServiceClusterTable struct {
|
||||
f5.IdMetaTable[Web3ServiceCluster]
|
||||
selfConf *Web3ServiceCluster
|
||||
}
|
||||
|
||||
func (this *Web3ServiceCluster) Init1() {
|
||||
|
||||
}
|
@ -6,6 +6,7 @@ import (
|
||||
|
||||
type table struct {
|
||||
AdminCluster *AdminClusterTable
|
||||
Web3ServiceCluster *Web3ServiceClusterTable
|
||||
GameDb *GameDbTable
|
||||
FriendDb *FriendDbTable
|
||||
AccountDb *AccountDbTable
|
||||
@ -21,6 +22,10 @@ var Table = f5.New(func(this *table) {
|
||||
this.PrimKey = "instance_id"
|
||||
})
|
||||
|
||||
this.Web3ServiceCluster = f5.New(func(this *Web3ServiceClusterTable) {
|
||||
this.FileName = "../config/web3service.cluster.json"
|
||||
})
|
||||
|
||||
this.GameDb = f5.New(func(this *GameDbTable) {
|
||||
this.FileName = "../config/gamedb.mysql.json"
|
||||
this.PrimKey = ""
|
||||
|
@ -13,6 +13,13 @@ type AdminCluster struct {
|
||||
_flags2_ uint64
|
||||
}
|
||||
|
||||
type Web3ServiceCluster struct {
|
||||
url string
|
||||
|
||||
_flags1_ uint64
|
||||
_flags2_ uint64
|
||||
}
|
||||
|
||||
type GameDb struct {
|
||||
host string
|
||||
port int32
|
||||
@ -122,6 +129,14 @@ func (this *AdminCluster) HasHttpListenPort() bool {
|
||||
return (this._flags1_ & (uint64(1) << 3)) > 0
|
||||
}
|
||||
|
||||
func (this *Web3ServiceCluster) GetUrl() string {
|
||||
return this.url
|
||||
}
|
||||
|
||||
func (this *Web3ServiceCluster) HasUrl() bool {
|
||||
return (this._flags1_ & (uint64(1) << 1)) > 0
|
||||
}
|
||||
|
||||
func (this *GameDb) GetHost() string {
|
||||
return this.host
|
||||
}
|
||||
@ -473,6 +488,10 @@ func (this *AdminCluster) LoadFromKv(kv map[string]interface{}) {
|
||||
f5.ReadMetaTableField(&this.http_listen_port, "http_listen_port", &this._flags1_, 3, kv)
|
||||
}
|
||||
|
||||
func (this *Web3ServiceCluster) LoadFromKv(kv map[string]interface{}) {
|
||||
f5.ReadMetaTableField(&this.url, "url", &this._flags1_, 1, kv)
|
||||
}
|
||||
|
||||
func (this *GameDb) LoadFromKv(kv map[string]interface{}) {
|
||||
f5.ReadMetaTableField(&this.host, "host", &this._flags1_, 1, kv)
|
||||
f5.ReadMetaTableField(&this.port, "port", &this._flags1_, 2, kv)
|
||||
|
@ -9,6 +9,11 @@ message AdminCluster
|
||||
optional int32 http_listen_port = 3;
|
||||
}
|
||||
|
||||
message Web3ServiceCluster
|
||||
{
|
||||
optional string url = 1;
|
||||
}
|
||||
|
||||
message GameDb
|
||||
{
|
||||
optional string host = 1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user