Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for LocalityMatch (0.21 sec)

  1. pilot/pkg/networking/core/loadbalancer/loadbalancer.go

    	// Envoy to do weighted load balancing across different zones and geographical locations.
    	for _, localityWeightSetting := range distribute {
    		if localityWeightSetting != nil &&
    			util.LocalityMatch(locality, localityWeightSetting.From) {
    			misMatched := sets.Set[int]{}
    			for i := range loadAssignment.Endpoints {
    				misMatched.Insert(i)
    			}
    			for locality, weight := range localityWeightSetting.To {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Apr 23 05:38:57 UTC 2024
    - 11.8K bytes
    - Viewed (0)
  2. 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)
  3. 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)
Back to top