- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for LocalityMatch (1.08 sec)
-
pilot/pkg/networking/util/util.go
func IsLocalityEmpty(locality *core.Locality) bool { if locality == nil || (len(locality.GetRegion()) == 0) { return true } return false } func LocalityMatch(proxyLocality *core.Locality, ruleLocality string) bool { ruleRegion, ruleZone, ruleSubzone := label.SplitLocalityLabel(ruleLocality) regionMatch := ruleRegion == "*" || proxyLocality.GetRegion() == ruleRegion
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Thu Jun 13 01:56:28 UTC 2024 - 28.5K bytes - Viewed (0) -
pilot/pkg/networking/util/util_test.go
Region: "region1", Zone: "zone1", }, rule: "region1/zone1/subzone2", match: false, }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { match := LocalityMatch(tt.locality, tt.rule) if match != tt.match { t.Errorf("Expected matching result %v, but got %v", tt.match, match) } }) } } func TestIsLocalityEmpty(t *testing.T) {
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Wed May 29 01:17:58 UTC 2024 - 40K bytes - Viewed (0)