Commit 3445674bd1448ccbca3ffbad22ec47a0b0df63f6

Authored by zhangqijia
1 parent a96e994d

fix: del

cmd/gameserver/service/game.go
@@ -89,7 +89,6 @@ func (s *GameServer) Stop() { @@ -89,7 +89,6 @@ func (s *GameServer) Stop() {
89 89
90 mongoproxy.CloseMongo() 90 mongoproxy.CloseMongo()
91 redisproxy.CloseRedis() 91 redisproxy.CloseRedis()
92 - //etcd.CloseEtcd()  
93 } 92 }
94 93
95 func (s *GameServer) OnConnection(conn components.IConnection) { 94 func (s *GameServer) OnConnection(conn components.IConnection) {
cmd/httpserver/service/http.go
@@ -30,13 +30,6 @@ func (s *AccountServer) Init(sconf *common.SConf) error { @@ -30,13 +30,6 @@ func (s *AccountServer) Init(sconf *common.SConf) error {
30 return err 30 return err
31 } 31 }
32 32
33 - //Etcd 初始化  
34 - //err = etcd.NewEtcdClient(common.GlobalConf.Etcd)  
35 - //if err != nil {  
36 - // return err  
37 - //}  
38 - //etcd.PutWithLeasePrefix(sconf.Name, fmt.Sprintf("%d", sconf.ID), fmt.Sprintf("%s:%d", sconf.IP, sconf.Port), 5)  
39 -  
40 models.NewDBSeed(sconf.ID).InitServerDatabase(models.AccountModels()) 33 models.NewDBSeed(sconf.ID).InitServerDatabase(models.AccountModels())
41 models.DBSeedS().InitAutoIncreUidTable(models.AccountModels()) 34 models.DBSeedS().InitAutoIncreUidTable(models.AccountModels())
42 return nil 35 return nil
@@ -62,5 +55,4 @@ func (s *AccountServer) Start() error { @@ -62,5 +55,4 @@ func (s *AccountServer) Start() error {
62 55
63 func (s *AccountServer) Stop() { 56 func (s *AccountServer) Stop() {
64 s.IHttp.Stop() 57 s.IHttp.Stop()
65 - //etcd.CloseEtcd()  
66 } 58 }
@@ -16,11 +16,6 @@ type RedisConf struct { @@ -16,11 +16,6 @@ type RedisConf struct {
16 DB int `json:"db"` 16 DB int `json:"db"`
17 } 17 }
18 18
19 -type Etcd struct {  
20 - Endpoints []string `json:"endpoints"`  
21 - DialTimeout int `json:"dialtimeout"`  
22 -}  
23 -  
24 type MongoConf struct { 19 type MongoConf struct {
25 User string `yaml:"user"` 20 User string `yaml:"user"`
26 Password string `yaml:"password"` 21 Password string `yaml:"password"`
@@ -86,22 +81,20 @@ type GameService struct { @@ -86,22 +81,20 @@ type GameService struct {
86 } 81 }
87 82
88 type ServerConf struct { 83 type ServerConf struct {
89 - ID string `yaml:"id"`  
90 - Name string `yaml:"name"`  
91 - WorkerID int64 `yaml:"workerid"`  
92 - DatacenterID int64 `yaml:"datacenterid"`  
93 - AccountConf *SConf `yaml:"server_account"`  
94 - GameConf *SConf `yaml:"server_game"`  
95 - LogConf *LogConf `yaml:"logconf" json:"logconf"`  
96 - TestClient *TestClient `yaml:"test_client"`  
97 - //Etcd *Etcd `yaml:"etcd"`  
98 - GameService *GameService `yaml:"server_list"` 84 + ID string `yaml:"id"`
  85 + Name string `yaml:"name"`
  86 + WorkerID int64 `yaml:"workerid"`
  87 + DatacenterID int64 `yaml:"datacenterid"`
  88 + AccountConf *SConf `yaml:"server_account"`
  89 + GameConf *SConf `yaml:"server_game"`
  90 + LogConf *LogConf `yaml:"logconf" json:"logconf"`
  91 + TestClient *TestClient `yaml:"test_client"`
  92 + GameService *GameService `yaml:"server_list"`
99 } 93 }
100 94
101 var ( 95 var (
102 GlobalConf ServerConf 96 GlobalConf ServerConf
103 GlobalSconf *SConf 97 GlobalSconf *SConf
104 - //SnowFlack *snow.Snowflake  
105 ) 98 )
106 99
107 func init() { 100 func init() {
@@ -140,7 +133,4 @@ func init() { @@ -140,7 +133,4 @@ func init() {
140 fmt.Errorf("log conf %v", err) 133 fmt.Errorf("log conf %v", err)
141 return 134 return
142 } 135 }
143 -  
144 - //初始化雪花算法  
145 - //SnowFlack = snow.NewSnowflake(GlobalConf.WorkerID, GlobalConf.DatacenterID)  
146 } 136 }