Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for CloneClusterLoadAssignment (0.43 sec)

  1. pilot/pkg/networking/util/util_test.go

    	}},
    }
    
    func BenchmarkCloneClusterLoadAssignment(b *testing.B) {
    	for i := 0; i < b.N; i++ {
    		cpy := CloneClusterLoadAssignment(testCla)
    		_ = cpy
    	}
    }
    
    func TestCloneClusterLoadAssignment(t *testing.T) {
    	cloned := CloneClusterLoadAssignment(testCla)
    	cloned2 := CloneClusterLoadAssignment(testCla)
    	if !cmp.Equal(testCla, cloned, protocmp.Transform()) {
    		t.Fatalf("expected %v to be the same as %v", testCla, cloned)
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed May 29 01:17:58 UTC 2024
    - 40K bytes
    - Viewed (0)
  2. pilot/pkg/xds/endpoints/endpoint_builder.go

    	if lbSetting != nil {
    		// Make a shallow copy of the cla as we are mutating the endpoints with priorities/weights relative to the calling proxy
    		l = util.CloneClusterLoadAssignment(l)
    		wrappedLocalityLbEndpoints := make([]*loadbalancer.WrappedLocalityLbEndpoints, len(localityLbEndpoints))
    		for i := range localityLbEndpoints {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Sun Apr 28 02:18:19 UTC 2024
    - 26.1K bytes
    - Viewed (0)
  3. pilot/pkg/networking/util/util.go

    			if proxyLocality.GetSubZone() == endpointsLocality.GetSubZone() {
    				return 0
    			}
    			return 1
    		}
    		return 2
    	}
    	return 3
    }
    
    // return a shallow copy ClusterLoadAssignment
    func CloneClusterLoadAssignment(original *endpoint.ClusterLoadAssignment) *endpoint.ClusterLoadAssignment {
    	if original == nil {
    		return nil
    	}
    	out := &endpoint.ClusterLoadAssignment{}
    
    	out.ClusterName = original.ClusterName
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Jun 13 01:56:28 UTC 2024
    - 28.5K bytes
    - Viewed (0)
Back to top