Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for ResourceFor (0.73 sec)

  1. staging/src/k8s.io/apimachinery/pkg/api/meta/lazy.go

    		return []schema.GroupVersionKind{}, err
    	}
    	return o.mapper.KindsFor(resource)
    }
    
    func (o *lazyObject) ResourceFor(input schema.GroupVersionResource) (schema.GroupVersionResource, error) {
    	if err := o.init(); err != nil {
    		return schema.GroupVersionResource{}, err
    	}
    	return o.mapper.ResourceFor(input)
    }
    
    func (o *lazyObject) ResourcesFor(input schema.GroupVersionResource) ([]schema.GroupVersionResource, error) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Nov 05 23:44:02 UTC 2021
    - 3.1K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apimachinery/pkg/api/meta/firsthit_restmapper.go

    	return fmt.Sprintf("FirstHitRESTMapper{\n\t%v\n}", m.MultiRESTMapper)
    }
    
    func (m FirstHitRESTMapper) ResourceFor(resource schema.GroupVersionResource) (schema.GroupVersionResource, error) {
    	errors := []error{}
    	for _, t := range m.MultiRESTMapper {
    		ret, err := t.ResourceFor(resource)
    		if err == nil {
    			return ret, nil
    		}
    		errors = append(errors, err)
    	}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Nov 05 23:44:02 UTC 2021
    - 2.8K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apimachinery/pkg/api/meta/multirestmapper_test.go

    func (m fixedRESTMapper) KindsFor(resource schema.GroupVersionResource) (gvk []schema.GroupVersionKind, err error) {
    	return m.kindsFor, m.err
    }
    
    func (m fixedRESTMapper) ResourceFor(resource schema.GroupVersionResource) (schema.GroupVersionResource, error) {
    	return m.resourceFor, m.err
    }
    
    func (m fixedRESTMapper) KindFor(resource schema.GroupVersionResource) (schema.GroupVersionKind, error) {
    	return m.kindFor, m.err
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jan 05 01:49:02 UTC 2018
    - 13.6K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apimachinery/pkg/api/meta/interfaces.go

    	KindsFor(resource schema.GroupVersionResource) ([]schema.GroupVersionKind, error)
    
    	// ResourceFor takes a partial resource and returns the single match.  Returns an error if there are multiple matches
    	ResourceFor(input schema.GroupVersionResource) (schema.GroupVersionResource, error)
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Nov 05 23:44:02 UTC 2021
    - 5.5K bytes
    - Viewed (0)
  5. staging/src/k8s.io/apimachinery/pkg/api/meta/priority.go

    	return fmt.Sprintf("PriorityRESTMapper{\n\t%v\n\t%v\n\t%v\n}", m.ResourcePriority, m.KindPriority, m.Delegate)
    }
    
    // ResourceFor finds all resources, then passes them through the ResourcePriority patterns to find a single matching hit.
    func (m PriorityRESTMapper) ResourceFor(partiallySpecifiedResource schema.GroupVersionResource) (schema.GroupVersionResource, error) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Nov 05 23:44:02 UTC 2021
    - 7.6K bytes
    - Viewed (0)
  6. staging/src/k8s.io/apimachinery/pkg/api/meta/multirestmapper.go

    			}
    		}
    	}
    
    	if len(allGVKs) == 0 {
    		return nil, &NoResourceMatchError{PartialResource: resource}
    	}
    
    	return allGVKs, nil
    }
    
    func (m MultiRESTMapper) ResourceFor(resource schema.GroupVersionResource) (schema.GroupVersionResource, error) {
    	resources, err := m.ResourcesFor(resource)
    	if err != nil {
    		return schema.GroupVersionResource{}, err
    	}
    	if len(resources) == 1 {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Nov 05 23:44:02 UTC 2021
    - 5.8K bytes
    - Viewed (0)
  7. staging/src/k8s.io/apiserver/pkg/admission/initializer/initializer_test.go

    	return schema.GroupVersionKind{}, nil
    }
    func (doNothingRESTMapper) KindsFor(resource schema.GroupVersionResource) ([]schema.GroupVersionKind, error) {
    	return nil, nil
    }
    func (doNothingRESTMapper) ResourceFor(input schema.GroupVersionResource) (schema.GroupVersionResource, error) {
    	return schema.GroupVersionResource{}, nil
    }
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Mar 06 00:00:21 UTC 2024
    - 8.2K bytes
    - Viewed (0)
  8. staging/src/k8s.io/apimachinery/pkg/api/meta/priority_test.go

    		},
    	}
    
    	for _, tc := range tcs {
    		mapper := PriorityRESTMapper{Delegate: tc.delegate, ResourcePriority: tc.resourcePatterns}
    
    		actualResult, actualErr := mapper.ResourceFor(schema.GroupVersionResource{})
    		if e, a := tc.result, actualResult; e != a {
    			t.Errorf("%s: expected %v, got %v", tc.name, e, a)
    		}
    		if len(tc.err) == 0 && actualErr == nil {
    			continue
    		}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Apr 06 15:24:58 UTC 2018
    - 13.6K bytes
    - Viewed (0)
  9. staging/src/k8s.io/apimachinery/pkg/api/meta/restmapper.go

    		return nil, &NoResourceMatchError{PartialResource: resource}
    	}
    
    	sort.Sort(resourceByPreferredGroupVersion{ret, m.defaultGroupVersions})
    	return ret, nil
    }
    
    func (m *DefaultRESTMapper) ResourceFor(resource schema.GroupVersionResource) (schema.GroupVersionResource, error) {
    	resources, err := m.ResourcesFor(resource)
    	if err != nil {
    		return schema.GroupVersionResource{}, err
    	}
    	if len(resources) == 1 {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Nov 17 01:55:47 UTC 2021
    - 16.1K bytes
    - Viewed (0)
  10. plugin/pkg/admission/gc/gc_admission_test.go

    	// this ok because if the test works, this method should never be called.
    	panic("test failed")
    }
    func (r *neverReturningRESTMapper) ResourceFor(input schema.GroupVersionResource) (schema.GroupVersionResource, error) {
    	// this ok because if the test works, this method should never be called.
    	panic("test failed")
    }
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Apr 29 21:28:42 UTC 2024
    - 24.5K bytes
    - Viewed (0)
Back to top