Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for computePodKey (0.31 sec)

  1. staging/src/k8s.io/apiserver/pkg/storage/testing/store_tests.go

    		storedObj *example.Pod
    	}{
    		{
    			key: computePodKey(barFirst),
    			obj: barFirst,
    		},
    		{
    			key: computePodKey(barSecond),
    			obj: barSecond,
    		},
    		{
    			key: computePodKey(fooSecond),
    			obj: fooSecond,
    		},
    		{
    			key: computePodKey(barfooThird),
    			obj: barfooThird,
    		},
    		{
    			key: computePodKey(fooThird),
    			obj: fooThird,
    		},
    		{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 11 12:45:33 UTC 2024
    - 91.4K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiserver/pkg/storage/testing/utils.go

    	return data, nil
    }
    
    type sortablePodList []example.Pod
    
    func (s sortablePodList) Len() int {
    	return len(s)
    }
    
    func (s sortablePodList) Less(i, j int) bool {
    	return computePodKey(&s[i]) < computePodKey(&s[j])
    }
    
    func (s sortablePodList) Swap(i, j int) {
    	s[i], s[j] = s[j], s[i]
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Mar 22 07:26:55 UTC 2024
    - 10.3K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apiserver/pkg/storage/cacher/lister_watcher_test.go

    		{ObjectMeta: metav1.ObjectMeta{Name: "baz", Namespace: "test-ns"}},
    		{ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "test-ns"}},
    	}
    	for _, obj := range objects {
    		out := &example.Pod{}
    		key := computePodKey(obj)
    		if err := store.Create(context.Background(), key, obj, out, 0); err != nil {
    			t.Fatalf("Create failed: %v", err)
    		}
    	}
    
    	lw := NewListerWatcher(store, prefix, fn, nil)
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Mar 04 11:51:06 UTC 2024
    - 3.6K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apiserver/pkg/storage/cacher/cacher_testing_utils_test.go

    		newPod,
    		newPodList,
    		prefix,
    		"/pods",
    		schema.GroupResource{Resource: "pods"},
    		identity.NewEncryptCheckTransformer(),
    		etcd3.NewDefaultLeaseManagerConfig())
    	return server, storage
    }
    
    func computePodKey(obj *example.Pod) string {
    	return fmt.Sprintf("/pods/%s/%s", obj.Namespace, obj.Name)
    }
    
    func compactStorage(c *Cacher, client *clientv3.Client) storagetesting.Compaction {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Oct 20 20:43:52 UTC 2023
    - 3.8K bytes
    - Viewed (0)
  5. staging/src/k8s.io/apiserver/pkg/storage/testing/watcher_tests.go

    		out := &example.Pod{}
    		err := store.Create(ctx, computePodKey(initialPod), initialPod, out, 0)
    		require.NoError(t, err, "failed to add a pod: %v")
    		initialPods = append(initialPods, out)
    	}
    
    	// add the pod to a different ns to advance the global RV
    	pod := makePod("1")
    	pod.Namespace = "other-ns-foo"
    	otherNsPod := &example.Pod{}
    	err := store.Create(ctx, computePodKey(pod), pod, otherNsPod, 0)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 63.8K bytes
    - Viewed (0)
  6. staging/src/k8s.io/apiserver/pkg/storage/cacher/cacher_whitebox_test.go

    	lastRV := uint64(0)
    	for i := 0; i < 5; i++ {
    		pod := &example.Pod{ObjectMeta: metav1.ObjectMeta{Name: fmt.Sprintf("foo-%d", i), Namespace: "test-ns"}}
    		out := &example.Pod{}
    		key := computePodKey(pod)
    		if err := etcdStorage.Create(context.Background(), key, pod, out, 0); err != nil {
    			t.Fatalf("Create failed: %v", err)
    		}
    		var err error
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jun 12 10:12:02 UTC 2024
    - 82.9K bytes
    - Viewed (0)
Back to top