mirror of
https://github.com/alibaba/higress.git
synced 2026-06-09 04:37:31 +08:00
Supports MCP service configuration protocol and SNI, along with various other fixes. (#1369)
This commit is contained in:
@@ -301,7 +301,7 @@ func (w *watcher) getSubscribeCallback(groupName string, serviceName string) fun
|
||||
if err != nil {
|
||||
if strings.Contains(err.Error(), "hosts is empty") {
|
||||
if w.updateCacheWhenEmpty {
|
||||
w.cache.DeleteServiceEntryWrapper(host)
|
||||
w.cache.DeleteServiceWrapper(host)
|
||||
}
|
||||
} else {
|
||||
log.Errorf("callback error:%v", err)
|
||||
@@ -312,11 +312,12 @@ func (w *watcher) getSubscribeCallback(groupName string, serviceName string) fun
|
||||
return
|
||||
}
|
||||
serviceEntry := w.generateServiceEntry(host, services)
|
||||
w.cache.UpdateServiceEntryWrapper(host, &memory.ServiceEntryWrapper{
|
||||
w.cache.UpdateServiceWrapper(host, &memory.ServiceWrapper{
|
||||
ServiceName: serviceName,
|
||||
ServiceEntry: serviceEntry,
|
||||
Suffix: suffix,
|
||||
RegistryType: w.Type,
|
||||
RegistryName: w.Name,
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -374,7 +375,7 @@ func (w *watcher) Stop() {
|
||||
suffix := strings.Join([]string{s[0], w.NacosNamespace, w.Type}, common.DotSeparator)
|
||||
suffix = strings.ReplaceAll(suffix, common.Underscore, common.Hyphen)
|
||||
host := strings.Join([]string{s[1], suffix}, common.DotSeparator)
|
||||
w.cache.DeleteServiceEntryWrapper(host)
|
||||
w.cache.DeleteServiceWrapper(host)
|
||||
}
|
||||
w.isStop = true
|
||||
close(w.stop)
|
||||
|
||||
Reference in New Issue
Block a user