1
This commit is contained in:
parent
4928103c06
commit
2bf64f4b70
@ -18,18 +18,22 @@ func (this *ConfigTable) GetGameSApiUrl() string {
|
|||||||
return this.selfConf.GetGamesapiUrl()
|
return this.selfConf.GetGamesapiUrl()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (this *ConfigTable) GetRedirectUrl() string {
|
||||||
|
return this.selfConf.GetRedirectUrl()
|
||||||
|
}
|
||||||
|
|
||||||
func (this *ConfigTable) GetSecretKey() string {
|
func (this *ConfigTable) GetSecretKey() string {
|
||||||
return this.selfConf.GetSecretKey()
|
return this.selfConf.GetSecretKey()
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *ConfigTable) GetMaxConcurrentNum() int32 {
|
|
||||||
return this.selfConf.GetMaxConcurrentNum()
|
|
||||||
}
|
|
||||||
|
|
||||||
func (this *ConfigTable) GetRedirectSecretKey() string {
|
func (this *ConfigTable) GetRedirectSecretKey() string {
|
||||||
return this.selfConf.GetRedirectSecretKey()
|
return this.selfConf.GetRedirectSecretKey()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (this *ConfigTable) GetMaxConcurrentNum() int32 {
|
||||||
|
return this.selfConf.GetMaxConcurrentNum()
|
||||||
|
}
|
||||||
|
|
||||||
func (this *ConfigTable) PostInit1() {
|
func (this *ConfigTable) PostInit1() {
|
||||||
this.selfConf = this.GetById(int64(0))
|
this.selfConf = this.GetById(int64(0))
|
||||||
if this.selfConf == nil {
|
if this.selfConf == nil {
|
||||||
|
@ -223,8 +223,7 @@ func (this *sApiForward) LoadDownStreams() error {
|
|||||||
func (this *sApiForward) GetDownStreamHost() (string, string) {
|
func (this *sApiForward) GetDownStreamHost() (string, string) {
|
||||||
downStreams := this.downStreams
|
downStreams := this.downStreams
|
||||||
if len(downStreams) <= 0 {
|
if len(downStreams) <= 0 {
|
||||||
newUrl := mt.Table.Config.GetById(0).GetRedirectUrl()
|
return mt.Table.Config.GetRedirectUrl(), ""
|
||||||
return newUrl, ""
|
|
||||||
}
|
}
|
||||||
downStream := downStreams[rand.Intn(len(downStreams))]
|
downStream := downStreams[rand.Intn(len(downStreams))]
|
||||||
return downStream.url, downStream.host
|
return downStream.url, downStream.host
|
||||||
|
Loading…
x
Reference in New Issue
Block a user