- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 22 for KindFor (0.17 sec)
-
staging/src/k8s.io/apimachinery/pkg/api/meta/lazy.go
o.loaded = true return o.err } var _ ResettableRESTMapper = &lazyObject{} func (o *lazyObject) KindFor(resource schema.GroupVersionResource) (schema.GroupVersionKind, error) { if err := o.init(); err != nil { return schema.GroupVersionKind{}, err } return o.mapper.KindFor(resource) } func (o *lazyObject) KindsFor(resource schema.GroupVersionResource) ([]schema.GroupVersionKind, 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) -
staging/src/k8s.io/apimachinery/pkg/api/meta/firsthit_restmapper.go
errors = append(errors, err) } return schema.GroupVersionResource{}, collapseAggregateErrors(errors) } func (m FirstHitRESTMapper) KindFor(resource schema.GroupVersionResource) (schema.GroupVersionKind, error) { errors := []error{} for _, t := range m.MultiRESTMapper { ret, err := t.KindFor(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) -
staging/src/k8s.io/apimachinery/pkg/api/meta/multirestmapper_test.go
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 } func (m fixedRESTMapper) RESTMapping(gk schema.GroupKind, versions ...string) (mapping *RESTMapping, err error) { return nil, 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) -
staging/src/k8s.io/apimachinery/pkg/api/meta/interfaces.go
// unique across groups. // // TODO: split into sub-interfaces type RESTMapper interface { // KindFor takes a partial resource and returns the single match. Returns an error if there are multiple matches KindFor(resource schema.GroupVersionResource) (schema.GroupVersionKind, error) // KindsFor takes a partial resource and returns the list of potential kinds in priority order
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Nov 05 23:44:02 UTC 2021 - 5.5K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/runtime/mapper_test.go
mapper.RegisterKindFor(data.gvr, data.subresource, data.gvk) } // verify for _, data := range kindsToRegister { if kind := mapper.KindFor(data.gvr, data.subresource); kind != data.gvk { t.Errorf("KindFor(%#v, %v) returned %#v, expected %#v", data.gvr, data.subresource, kind, data.gvk) } } // Verify equivalents to primary resource
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Apr 12 15:48:03 UTC 2023 - 6.7K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/api/meta/priority.go
} return schema.GroupVersionResource{}, &AmbiguousResourceError{PartialResource: partiallySpecifiedResource, MatchingResources: originalGVRs} } // KindFor finds all kinds, then passes them through the KindPriority patterns to find a single matching hit. func (m PriorityRESTMapper) KindFor(partiallySpecifiedResource schema.GroupVersionResource) (schema.GroupVersionKind, error) { originalGVKs, originalErr := m.Delegate.KindsFor(partiallySpecifiedResource)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Nov 05 23:44:02 UTC 2021 - 7.6K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/runtime/mapper.go
r.mutex.RLock() defer r.mutex.RUnlock() return r.resources[r.keys[resource.GroupResource()]][subresource] } func (r *equivalentResourceRegistry) KindFor(resource schema.GroupVersionResource, subresource string) schema.GroupVersionKind { r.mutex.RLock() defer r.mutex.RUnlock() return r.kinds[resource][subresource] }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue May 28 18:26:06 UTC 2019 - 3.6K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/api/meta/multirestmapper.go
if len(resources) == 1 { return resources[0], nil } return schema.GroupVersionResource{}, &AmbiguousResourceError{PartialResource: resource, MatchingResources: resources} } func (m MultiRESTMapper) KindFor(resource schema.GroupVersionResource) (schema.GroupVersionKind, error) { kinds, err := m.KindsFor(resource) if err != nil { return schema.GroupVersionKind{}, err } if len(kinds) == 1 { return kinds[0], nil
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Nov 05 23:44:02 UTC 2021 - 5.8K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/api/meta/restmapper_test.go
mapper := NewDefaultRESTMapper([]schema.GroupVersion{testGroupVersion}) if len(testCase.ExpectedGVK.Kind) != 0 { mapper.Add(testCase.ExpectedGVK, RESTScopeNamespace) } actualGVK, err := mapper.KindFor(testCase.Resource) hasErr := err != nil if hasErr != testCase.Err { t.Errorf("%d: unexpected error behavior %t: %v", i, testCase.Err, err) continue } if err != nil { continue }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sun Nov 01 08:38:57 UTC 2020 - 28.9K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/admission/plugin/policy/matching/matching.go
m := rules.Matcher{ Rule: rule, Attr: attrWithOverride, } if !m.Matches() { continue } matchKind = o.GetEquivalentResourceMapper().KindFor(equivalent, attr.GetSubresource()) if matchKind.Empty() { return false, schema.GroupVersionResource{}, schema.GroupVersionKind{}, fmt.Errorf("unable to convert to %v: unknown kind", equivalent) }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Mar 06 00:00:21 UTC 2024 - 6.8K bytes - Viewed (0)