Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 12 for RequiresExactMatch (0.34 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/fields/selector.go

    	Matches(Fields) bool
    
    	// Empty returns true if this selector does not restrict the selection space.
    	Empty() bool
    
    	// RequiresExactMatch allows a caller to introspect whether a given selector
    	// requires a single specific field to be set, and if so returns the value it
    	// requires.
    	RequiresExactMatch(field string) (value string, found bool)
    
    	// Transform returns a new copy of the selector after TransformFunc has been
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 23 20:40:07 UTC 2020
    - 12.3K bytes
    - Viewed (0)
  3. 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)
  4. 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)
  5. 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)
  6. 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)
  7. 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)
  8. staging/src/k8s.io/apimachinery/pkg/fields/selector_test.go

    		"andTerm with non-match":    {andTerm{&hasTerm{}, &hasTerm{"test", "b"}}, "test", "b", true},
    	}
    	for k, v := range testCases {
    		value, found := v.S.RequiresExactMatch(v.Label)
    		if value != v.Value {
    			t.Errorf("%s: expected value %s, got %s", k, v.Value, value)
    		}
    		if found != v.Found {
    			t.Errorf("%s: expected found %t, got %t", k, v.Found, found)
    		}
    	}
    }
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Jul 27 08:00:38 UTC 2017
    - 11.2K bytes
    - Viewed (0)
  9. 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)
  10. 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)
Back to top