mirror of
https://github.com/alibaba/higress.git
synced 2026-06-03 09:37:28 +08:00
fix invalid ai-proxy cluster (#1947)
Co-authored-by: Kent Dong <ch3cho@qq.com>
This commit is contained in:
@@ -1,17 +0,0 @@
|
|||||||
package provider
|
|
||||||
|
|
||||||
import "fmt"
|
|
||||||
|
|
||||||
type plainCluster struct {
|
|
||||||
serviceName string
|
|
||||||
servicePort int64
|
|
||||||
hostName string
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c plainCluster) ClusterName() string {
|
|
||||||
return fmt.Sprintf("outbound|%d||%s", c.servicePort, c.serviceName)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c plainCluster) HostName() string {
|
|
||||||
return c.hostName
|
|
||||||
}
|
|
||||||
@@ -95,10 +95,10 @@ func createContextCache(providerConfig *ProviderConfig) *contextCache {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
fileUrlObj, _ := url.Parse(contextConfig.fileUrl)
|
fileUrlObj, _ := url.Parse(contextConfig.fileUrl)
|
||||||
cluster := plainCluster{
|
cluster := wrapper.FQDNCluster{
|
||||||
serviceName: contextConfig.serviceName,
|
FQDN: contextConfig.serviceName,
|
||||||
servicePort: contextConfig.servicePort,
|
Port: contextConfig.servicePort,
|
||||||
hostName: fileUrlObj.Host,
|
Host: fileUrlObj.Host,
|
||||||
}
|
}
|
||||||
return &contextCache{
|
return &contextCache{
|
||||||
client: wrapper.NewClusterClient(cluster),
|
client: wrapper.NewClusterClient(cluster),
|
||||||
|
|||||||
Reference in New Issue
Block a user