Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for BuildMatcher (0.12 sec)

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

    		OnMatch: &matcher.Matcher_OnMatch_Matcher{
    			Matcher: match,
    		},
    	}
    }
    
    // BuildMatcher cleans the entire match tree to avoid empty maps and returns a viable top-level matcher.
    // Note: this mutates the internal mappers/matchers that make up the tree.
    func (m Mapper) BuildMatcher() *matcher.Matcher {
    	root := m
    	for len(root.Map) == 0 {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Mar 28 17:09:02 UTC 2024
    - 6.2K bytes
    - Viewed (0)
  2. pilot/pkg/networking/core/match/match_test.go

    				want := NewDestinationPort()
    				want.Map["15001"] = ToChain("chain")
    				return want.Matcher
    			},
    		},
    	}
    
    	for _, tt := range tc {
    		t.Run(tt.name, func(t *testing.T) {
    			got := tt.given().BuildMatcher()
    			haveJSON, _ := protomarshal.ToJSONWithIndent(got, "  ")
    			wantJSON, _ := protomarshal.ToJSONWithIndent(tt.want(), "  ")
    
    			if diff := cmp.Diff(haveJSON, wantJSON, cmp.AllowUnexported()); diff != "" {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Mar 28 17:09:02 UTC 2024
    - 3.5K bytes
    - Viewed (0)
Back to top