- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 10 for ForResource (0.32 sec)
-
staging/src/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/informers/externalversions/generic.go
func (f *genericInformer) Lister() cache.GenericLister { return cache.NewGenericLister(f.Informer().GetIndexer(), f.resource) } // ForResource gives generic access to a shared informer of the matching type // TODO extend this to unknown resources with a client pool func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource) (GenericInformer, error) { switch resource { // Group=cr.example.apiextensions.k8s.io, Version=v1
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Mar 08 09:52:48 UTC 2018 - 2K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/storage/storagebackend/config.go
type ConfigForResource struct { // Config is the resource-independent configuration Config // GroupResource is the relevant one GroupResource schema.GroupResource } // ForResource specializes to the given resource func (config *Config) ForResource(resource schema.GroupResource) *ConfigForResource { return &ConfigForResource{ Config: *config, GroupResource: resource, } }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Jun 07 17:57:37 UTC 2024 - 4.3K bytes - Viewed (0) -
staging/src/k8s.io/apiextensions-apiserver/pkg/client/informers/externalversions/generic.go
func (f *genericInformer) Lister() cache.GenericLister { return cache.NewGenericLister(f.Informer().GetIndexer(), f.resource) } // ForResource gives generic access to a shared informer of the matching type // TODO extend this to unknown resources with a client pool func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource) (GenericInformer, error) { switch resource { // Group=apiextensions.k8s.io, Version=v1
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Aug 16 17:13:40 UTC 2019 - 2.3K bytes - Viewed (0) -
staging/src/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/informers/externalversions/factory.go
// WaitForCacheSync blocks until all started informers' caches were synced // or the stop channel gets closed. WaitForCacheSync(stopCh <-chan struct{}) map[reflect.Type]bool // ForResource gives generic access to a shared informer of the matching type. ForResource(resource schema.GroupVersionResource) (GenericInformer, error) // InformerFor returns the SharedIndexInformer for obj using an internal // client.
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Jul 18 18:31:26 UTC 2023 - 8.9K bytes - Viewed (0) -
staging/src/k8s.io/apiextensions-apiserver/pkg/client/informers/externalversions/factory.go
// WaitForCacheSync blocks until all started informers' caches were synced // or the stop channel gets closed. WaitForCacheSync(stopCh <-chan struct{}) map[reflect.Type]bool // ForResource gives generic access to a shared informer of the matching type. ForResource(resource schema.GroupVersionResource) (GenericInformer, error) // InformerFor returns the SharedIndexInformer for obj using an internal // client.
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Jul 18 18:31:26 UTC 2023 - 9K bytes - Viewed (0) -
pkg/registry/core/service/allocator/storage/storage_test.go
etcdStorage, server := registrytest.NewEtcdStorage(t, "") mem := allocator.NewAllocationMap(100, "rangeSpecValue") etcd, err := NewEtcd(mem, "/ranges/serviceips", etcdStorage.ForResource(api.Resource("serviceipallocations"))) if err != nil { t.Fatalf("unexpected error creating etcd: %v", err) } return etcd, server, mem, &etcdStorage.Config }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Sep 01 20:54:26 UTC 2021 - 4.8K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/storage/storagebackend/factory/tls_test.go
CertFile: certFile, KeyFile: keyFile, TrustedCAFile: caFile, TracerProvider: noopoteltrace.NewTracerProvider(), }, Codec: codec, } storage, destroyFunc, err := newETCD3Storage(*cfg.ForResource(schema.GroupResource{Resource: "pods"}), nil, nil, "") defer destroyFunc() if err != nil { t.Fatal(err) } err = storage.Create(context.TODO(), "/abc", &example.Pod{}, nil, 0) if err != nil {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Jun 07 17:57:37 UTC 2024 - 3.4K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/reconcilers/peer_endpoint_lease_test.go
newListFunc := func() runtime.Object { return &corev1.EndpointsList{} } sc.Codec = apitesting.TestStorageCodec(codecs, corev1.SchemeGroupVersion) s, dFunc, err := factory.Create(*sc.ForResource(schema.GroupResource{Resource: "endpoints"}), newFunc, newListFunc, "") if err != nil { t.Fatalf("Error creating storage: %v", err) } t.Cleanup(dFunc) tests := []struct { testName string
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Apr 24 18:25:29 UTC 2024 - 8.7K bytes - Viewed (0) -
pkg/registry/core/service/ipallocator/storage/storage_test.go
_, cidr, err := netutils.ParseCIDRSloppy("192.168.1.0/24") if err != nil { t.Fatal(err) } var backing allocator.Interface configForAllocations := etcdStorage.ForResource(api.Resource("serviceipallocations")) storage, err := ipallocator.New(cidr, func(max int, rangeSpec string, offset int) (allocator.Interface, error) { mem := allocator.NewAllocationMapWithOffset(max, rangeSpec, offset)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Aug 24 09:23:05 UTC 2023 - 5.9K bytes - Viewed (0) -
pkg/registry/core/service/portallocator/storage/storage_test.go
etcdStorage, server := registrytest.NewEtcdStorage(t, "") serviceNodePortRange := utilnet.PortRange{Base: basePortRange, Size: sizePortRange} configForAllocations := etcdStorage.ForResource(api.Resource("servicenodeportallocations")) var backing allocator.Interface storage, err := portallocator.New(serviceNodePortRange, func(max int, rangeSpec string, offset int) (allocator.Interface, error) {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed May 08 07:15:02 UTC 2024 - 8.1K bytes - Viewed (0)