Skip to content

Commit

Permalink
feat:support rls to push xds client
Browse files Browse the repository at this point in the history
  • Loading branch information
chuntaojun committed May 26, 2023
1 parent c5b9ece commit 094ef01
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cache/instance_query.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ func (ic *instanceCache) QueryInstances(filter, metaFilter map[string]string,
)

var (
svcName, hasSvc = filter["service"]
namespace, hasNamespace = filter["namespace"]
searchSvcName, hasSvc = filter["service"]
searchNamespace, hasNamespace = filter["namespace"]
id, hasId = filter["id"]
hosts, hasHost = filter["host"]
protocol, hasProtocol = filter["protocol"]
Expand Down Expand Up @@ -101,10 +101,10 @@ func (ic *instanceCache) QueryInstances(filter, metaFilter map[string]string,
if svc == nil {
return true, nil
}
if hasSvc && !utils.IsWildMatch(svc.Name, svcName) {
if hasSvc && !utils.IsWildMatch(svc.Name, searchSvcName) {
return true, nil
}
if hasNamespace && !utils.IsWildMatch(svc.Namespace, namespace) {
if hasNamespace && !utils.IsWildMatch(svc.Namespace, searchNamespace) {
return true, nil
}
if hasId && !utils.IsWildMatch(value.Proto.GetId().GetValue(), id) {
Expand Down

0 comments on commit 094ef01

Please sign in to comment.