package main

//初始化mgo
func initMgo() {
	if IsLocal {
		SourceMgo = &MongodbSim{
			MongodbAddr: "127.0.0.1:27017",
			DbName:      "qfw",
			Size:        10,
			UserName:    "",
			Password:    "",
		}
		SourceMgo.InitPool()

		ExtMgo = &MongodbSim{
			MongodbAddr: "127.0.0.1:27017",
			DbName:      "qfw",
			Size:        10,
			UserName:    "",
			Password:    "",
		}
		ExtMgo.InitPool()

		QyxyMgo = &MongodbSim{
			MongodbAddr: "127.0.0.1:27017",
			DbName:      "qfw",
			Size:        10,
			UserName:    "",
			Password:    "",
		}
		QyxyMgo.InitPool()

		SpiMgo = &MongodbSim{
			MongodbAddr: "127.0.0.1:27017",
			DbName:      "qfw",
			Size:        10,
			UserName:    "",
			Password:    "",
		}
		SpiMgo.InitPool()
	} else {
		SourceMgo = &MongodbSim{
			MongodbAddr: "172.17.145.163:27083,172.17.4.187:27082",
			DbName:      "qfw",
			Size:        10,
			UserName:    "zhengkun",
			Password:    "zk@123123",
		}
		SourceMgo.InitPool()

		ExtMgo = &MongodbSim{
			MongodbAddr: "172.17.4.85:27080",
			DbName:      "qfw",
			Size:        10,
			UserName:    "",
			Password:    "",
		}
		ExtMgo.InitPool()

		QyxyMgo = &MongodbSim{
			MongodbAddr: "172.17.145.163:27083,172.17.4.187:27082",
			DbName:      "mixdata",
			Size:        10,
			UserName:    "zhengkun",
			Password:    "zk@123123",
		}
		QyxyMgo.InitPool()

		SpiMgo = &MongodbSim{
			MongodbAddr: "172.17.4.86:27080",
			DbName:      "jyqyfw",
			Size:        10,
			UserName:    "",
			Password:    "",
		}
		SpiMgo.InitPool()
	}
}
