Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for MirrorPercentByPolicy (0.17 sec)

  1. pilot/pkg/networking/core/route/route_internal_test.go

    					Numerator:   500000,
    					Denominator: xdstype.FractionalPercent_MILLION,
    				},
    			},
    		},
    	}
    
    	for _, tt := range cases {
    		t.Run(tt.name, func(t *testing.T) {
    			mp := MirrorPercentByPolicy(tt.policy)
    			if !reflect.DeepEqual(mp, tt.want) {
    				t.Errorf("Unexpected mirror percent want %v, got %v", tt.want, mp)
    			}
    		})
    	}
    }
    
    func TestSourceMatchHTTP(t *testing.T) {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Sat May 11 02:47:57 UTC 2024
    - 18.2K bytes
    - Viewed (0)
  2. pilot/pkg/networking/core/route/route.go

    		return &core.RuntimeFractionalPercent{
    			DefaultValue: translateIntegerToFractionalPercent(100),
    		}
    	}
    }
    
    // MirrorPercentByPolicy computes the mirror percent to be used based on HTTPMirrorPolicy.
    func MirrorPercentByPolicy(mirror *networking.HTTPMirrorPolicy) *core.RuntimeFractionalPercent {
    	switch {
    	case mirror.Percentage != nil:
    		if mirror.Percentage.GetValue() > 0 {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue May 14 14:12:39 UTC 2024
    - 56.1K bytes
    - Viewed (0)
  3. pilot/pkg/networking/core/listener_waypoint.go

    				istio_route.TranslateRequestMirrorPolicy(in.Mirror, lb.serviceForHostname(host.Name(in.Mirror.Host)), listenerPort, mp))
    		}
    	}
    	for _, mirror := range in.Mirrors {
    		if mp := istio_route.MirrorPercentByPolicy(mirror); mp != nil && mirror.Destination != nil {
    			action.RequestMirrorPolicies = append(action.RequestMirrorPolicies,
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Jun 14 04:34:37 UTC 2024
    - 27.6K bytes
    - Viewed (0)
Back to top