Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 9 of 9 for RequiresExactMatch (0.64 sec)

  1. staging/src/k8s.io/apiserver/pkg/storage/selection_predicate.go

    // namespace.
    func (s *SelectionPredicate) MatchesSingleNamespace() (string, bool) {
    	if len(s.Continue) > 0 || s.Field == nil {
    		return "", false
    	}
    	if namespace, ok := s.Field.RequiresExactMatch("metadata.namespace"); ok {
    		return namespace, true
    	}
    	return "", false
    }
    
    // MatchesSingle will return (name, true) if and only if s.Field matches on the object's
    // name.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 04 09:20:10 UTC 2024
    - 5.6K bytes
    - Viewed (0)
  2. 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)
  3. staging/src/k8s.io/apiserver/pkg/util/flowcontrol/watch_tracker.go

    		klog.Warningf("Couldn't parse list options for %v: %v", r.URL.Query(), err)
    		return unsetValue
    	}
    	if opts.FieldSelector == nil {
    		return unsetValue
    	}
    	if value, ok := opts.FieldSelector.RequiresExactMatch(field); ok {
    		return value
    	}
    	return unsetValue
    }
    
    type indexValue struct {
    	resource string
    	value    string
    }
    
    // RegisterWatch implements WatchTracker interface.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sun Dec 18 04:27:38 UTC 2022
    - 7.4K bytes
    - Viewed (0)
  4. 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)
  5. 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)
  6. 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)
  7. staging/src/k8s.io/apiserver/pkg/storage/cacher/cacher.go

    		scope.namespace = requestNamespace
    	} else if selectorNamespace, ok := pred.Field.RequiresExactMatch("metadata.namespace"); ok {
    		scope.namespace = selectorNamespace
    	}
    	if requestInfo, ok := request.RequestInfoFrom(ctx); ok && requestInfo != nil && len(requestInfo.Name) > 0 {
    		scope.name = requestInfo.Name
    	} else if selectorName, ok := pred.Field.RequiresExactMatch("metadata.name"); ok {
    		scope.name = selectorName
    	}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jun 12 10:12:02 UTC 2024
    - 51.8K bytes
    - Viewed (0)
  8. 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)
  9. 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