- Sort Score
- Result 10 results
- Languages All
Results 1 - 5 of 5 for NamespaceKeyFunc (0.23 sec)
-
staging/src/k8s.io/apiserver/pkg/storage/util.go
func SimpleUpdate(fn SimpleUpdateFunc) UpdateFunc { return func(input runtime.Object, _ ResponseMeta) (runtime.Object, *uint64, error) { out, err := fn(input) return out, nil, err } } func NamespaceKeyFunc(prefix string, obj runtime.Object) (string, error) { meta, err := meta.Accessor(obj) if err != nil { return "", err } name := meta.GetName() if msgs := path.IsValidPathSegmentName(name); len(msgs) != 0 {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Apr 18 08:05:06 UTC 2024 - 4.6K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/storage/cacher/cacher_test.go
type setupOption func(*setupOptions) func withDefaults(options *setupOptions) { prefix := "/pods" options.resourcePrefix = prefix options.keyFunc = func(obj runtime.Object) (string, error) { return storage.NamespaceKeyFunc(prefix, obj) } options.clock = clock.RealClock{} } func withClusterScopedKeyFunc(options *setupOptions) { options.keyFunc = func(obj runtime.Object) (string, error) {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Jun 12 10:12:02 UTC 2024 - 17K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/registry/generic/registry/store.go
if ok && len(ns) > 0 { key = key + "/" + ns } return key } // NamespaceKeyFunc is the default function for constructing storage paths to // a resource relative to the given prefix enforcing namespace rules. If the // context does not contain a namespace, it errors. func NamespaceKeyFunc(ctx context.Context, prefix string, name string) (string, error) { key := NamespaceKeyRootFunc(ctx, prefix)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Jan 19 23:22:44 UTC 2024 - 60.8K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/storage/cacher/watch_cache_test.go
} // newTestWatchCache just adds a fake clock. func newTestWatchCache(capacity int, indexers *cache.Indexers) *testWatchCache { keyFunc := func(obj runtime.Object) (string, error) { return storage.NamespaceKeyFunc("prefix", obj) } getAttrsFunc := func(obj runtime.Object) (labels.Set, fields.Set, error) { pod, ok := obj.(*v1.Pod) if !ok { return nil, nil, fmt.Errorf("not a pod") }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Jun 04 09:20:10 UTC 2024 - 35.4K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/storage/cacher/cacher_whitebox_test.go
Versioner: storage.APIObjectVersioner{}, GroupResource: schema.GroupResource{Resource: "pods"}, ResourcePrefix: prefix, KeyFunc: func(obj runtime.Object) (string, error) { return storage.NamespaceKeyFunc(prefix, obj) }, GetAttrsFunc: func(obj runtime.Object) (labels.Set, fields.Set, error) { pod, ok := obj.(*example.Pod) if !ok { return storage.DefaultNamespaceScopedAttr(obj) }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Jun 12 10:12:02 UTC 2024 - 82.9K bytes - Viewed (0)