[REV] update service domain all with port start

This commit is contained in:
goodrain 2018-03-14 12:43:35 +08:00
parent a2b9ea0490
commit 025b9c496a

View File

@ -185,16 +185,7 @@ func (t *TenantServices) Autodomain(tenantName string, containerPort int) string
if strings.Contains(exDomain, ":") {
exDomain = strings.Split(exDomain, ":")[0]
}
if t.PortType == "dif_protocol" {
return fmt.Sprintf("%s.%s.%s", t.ServiceAlias, tenantName, exDomain)
}
if t.PortType == "multi_outer" {
return fmt.Sprintf("%d.%s.%s.%s", containerPort, t.ServiceAlias, tenantName, exDomain)
}
if t.PortType == "one_outer" {
return fmt.Sprintf("%s.%s.%s", t.ServiceAlias, tenantName, exDomain)
}
return ""
return fmt.Sprintf("%d.%s.%s.%s", containerPort, t.ServiceAlias, tenantName, exDomain)
}
//TableName 表名