Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for RequiresExactMatch (0.33 sec)

  1. staging/src/k8s.io/apimachinery/pkg/labels/selector.go

    	// Make a deep copy of the selector.
    	DeepCopySelector() Selector
    
    	// RequiresExactMatch allows a caller to introspect whether a given selector
    	// requires a single specific label to be set, and if so returns the value it
    	// requires.
    	RequiresExactMatch(label string) (value string, found bool)
    }
    
    // Sharing this saves 1 alloc per use; this is safe because it's immutable.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sun Dec 18 04:27:38 UTC 2022
    - 31.8K bytes
    - Viewed (0)
  2. pkg/controller/util/selectors/bimultimap_test.go

    }
    
    func (u *useOnceSelector) DeepCopySelector() pkglabels.Selector {
    	u.selector = u.selector.DeepCopySelector()
    	return u
    }
    
    func (u *useOnceSelector) RequiresExactMatch(label string) (value string, found bool) {
    	v, f := u.selector.RequiresExactMatch(label)
    	return v, f
    }
    
    func indexPermutations(size int) [][]int {
    	var permute func([]int, []int) [][]int
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Dec 13 01:56:36 UTC 2022
    - 16.9K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apiserver/pkg/endpoints/handlers/get.go

    			// nil, fields.Everything and field selector matching metadata.name
    			// for our name.
    			if opts.FieldSelector != nil && !opts.FieldSelector.Empty() {
    				selectedName, ok := opts.FieldSelector.RequiresExactMatch("metadata.name")
    				if !ok || name != selectedName {
    					scope.err(errors.NewBadRequest("fieldSelector metadata.name doesn't match requested name"), w, req)
    					return
    				}
    			} else {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Feb 16 10:22:16 UTC 2024
    - 10.7K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apiserver/pkg/endpoints/request/requestinfo.go

    				}
    			}
    		}
    
    		if opts.Watch {
    			requestInfo.Verb = "watch"
    		} else {
    			requestInfo.Verb = "list"
    		}
    
    		if opts.FieldSelector != nil {
    			if name, ok := opts.FieldSelector.RequiresExactMatch("metadata.name"); ok {
    				if len(path.IsValidPathSegmentName(name)) == 0 {
    					requestInfo.Name = name
    				}
    			}
    		}
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Jan 23 13:24:29 UTC 2023
    - 9.8K bytes
    - Viewed (0)
  5. staging/src/k8s.io/apiserver/pkg/endpoints/metrics/metrics.go

    		if selectorNamespace, ok := opts.FieldSelector.RequiresExactMatch("metadata.namespace"); ok {
    			namespace = selectorNamespace
    		}
    	}
    	if requestInfo, ok := request.RequestInfoFrom(ctx); ok && requestInfo != nil && len(requestInfo.Name) > 0 {
    		name = requestInfo.Name
    	} else if opts != nil && opts.FieldSelector != nil {
    		if selectorName, ok := opts.FieldSelector.RequiresExactMatch("metadata.name"); ok {
    			name = selectorName
    		}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Sep 27 07:29:19 UTC 2023
    - 35K bytes
    - Viewed (0)
  6. staging/src/k8s.io/apimachinery/pkg/labels/selector_test.go

    			},
    			label:         "key",
    			expectedFound: true,
    			expectedValue: "value",
    		},
    	}
    	for _, ts := range testCases {
    		t.Run(ts.name, func(t *testing.T) {
    			value, found := ts.sel.RequiresExactMatch(ts.label)
    			if found != ts.expectedFound {
    				t.Errorf("Expected match %v, found %v", ts.expectedFound, found)
    			}
    			if found && value != ts.expectedValue {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Nov 14 16:39:04 UTC 2022
    - 29.9K bytes
    - Viewed (0)
Back to top