- Sort Score
- Result 10 results
- Languages All
Results 1 - 5 of 5 for NewEquivalentResourceRegistryWithIdentity (0.46 sec)
-
staging/src/k8s.io/apimachinery/pkg/runtime/mapper.go
return &equivalentResourceRegistry{} } // NewEquivalentResourceRegistryWithIdentity creates a resource mapper with a custom identity function. // If "" is returned by the function, GroupResource#String is used as the identity. // GroupResources with the same identity string are considered equivalent. func NewEquivalentResourceRegistryWithIdentity(keyFunc func(schema.GroupResource) string) EquivalentResourceRegistry {
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/apiserver/pkg/admission/plugin/policy/matching/matching_test.go
a := &Matcher{namespaceMatcher: &namespace.Matcher{}, objectMatcher: &object.Matcher{}} allScopes := v1.AllScopes exactMatch := v1.Exact equivalentMatch := v1.Equivalent mapper := runtime.NewEquivalentResourceRegistryWithIdentity(func(resource schema.GroupResource) string { if resource.Resource == "deployments" { // co-locate deployments in all API groups return "/deployments" } return "" })
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Mar 06 00:00:21 UTC 2024 - 38.2K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/admission/plugin/webhook/generic/webhook_test.go
namespaceMatcher: &namespace.Matcher{}, objectMatcher: &object.Matcher{}, } allScopes := v1.AllScopes exactMatch := v1.Exact equivalentMatch := v1.Equivalent mapper := runtime.NewEquivalentResourceRegistryWithIdentity(func(resource schema.GroupResource) string { if resource.Resource == "deployments" { // co-locate deployments in all API groups return "/deployments" } return "" })
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Jun 28 19:30:04 UTC 2023 - 32K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/runtime/mapper_test.go
}, } for _, tc := range testcases { t.Run(tc.Name, func(t *testing.T) { mapper := NewEquivalentResourceRegistryWithIdentity(tc.IdentityFunc) // register for _, data := range kindsToRegister { mapper.RegisterKindFor(data.gvr, data.subresource, data.gvk) } // verify
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/apiserver/pkg/server/config.go
if c.EquivalentResourceRegistry == nil { if c.RESTOptionsGetter == nil { c.EquivalentResourceRegistry = runtime.NewEquivalentResourceRegistry() } else { c.EquivalentResourceRegistry = runtime.NewEquivalentResourceRegistryWithIdentity(func(groupResource schema.GroupResource) string { // use the storage prefix as the key if possible if opts, err := c.RESTOptionsGetter.GetRESTOptions(groupResource); err == nil {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue May 28 08:48:22 UTC 2024 - 47.7K bytes - Viewed (0)