mirror of
https://github.com/alibaba/higress.git
synced 2026-03-07 01:50:51 +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
|
||||
}
|
||||
fileUrlObj, _ := url.Parse(contextConfig.fileUrl)
|
||||
cluster := plainCluster{
|
||||
serviceName: contextConfig.serviceName,
|
||||
servicePort: contextConfig.servicePort,
|
||||
hostName: fileUrlObj.Host,
|
||||
cluster := wrapper.FQDNCluster{
|
||||
FQDN: contextConfig.serviceName,
|
||||
Port: contextConfig.servicePort,
|
||||
Host: fileUrlObj.Host,
|
||||
}
|
||||
return &contextCache{
|
||||
client: wrapper.NewClusterClient(cluster),
|
||||
|
||||
Reference in New Issue
Block a user