Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 3,192 for GetPod (0.28 sec)

  1. pkg/kubelet/kubelet_resources_test.go

    		pod      *v1.Pod
    		expected *v1.Pod
    	}{
    		{
    			pod:      getPod("0", "0"),
    			expected: getPod("6", "4Gi"),
    		},
    		{
    			pod:      getPod("1", "0"),
    			expected: getPod("1", "4Gi"),
    		},
    		{
    			pod:      getPod("", ""),
    			expected: getPod("6", "4Gi"),
    		},
    		{
    			pod:      getPod("0", "1Mi"),
    			expected: getPod("6", "1Mi"),
    		},
    	}
    	as := assert.New(t)
    	for idx, tc := range cases {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Oct 24 14:46:59 UTC 2019
    - 2.4K bytes
    - Viewed (0)
  2. pkg/scheduler/internal/cache/fake/fake_cache.go

    	return c.IsAssumedPodFunc(pod), nil
    }
    
    // GetPod is a fake method for testing.
    func (c *Cache) GetPod(pod *v1.Pod) (*v1.Pod, error) {
    	return c.GetPodFunc(pod), nil
    }
    
    // AddNode is a fake method for testing.
    func (c *Cache) AddNode(logger klog.Logger, node *v1.Node) *framework.NodeInfo { return nil }
    
    // UpdateNode is a fake method for testing.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon May 29 05:26:32 UTC 2023
    - 2.8K bytes
    - Viewed (0)
  3. pkg/scheduler/framework/runtime/waiting_pods_map.go

    			msg := fmt.Sprintf("rejected due to timeout after waiting %v at plugin %v",
    				waitTime, plugin)
    			wp.Reject(plugin, msg)
    		})
    	}
    
    	return wp
    }
    
    // GetPod returns a reference to the waiting pod.
    func (w *waitingPod) GetPod() *v1.Pod {
    	return w.pod
    }
    
    // GetPendingPlugins returns a list of pending permit plugin's name.
    func (w *waitingPod) GetPendingPlugins() []string {
    	w.mu.RLock()
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 17 09:07:27 UTC 2024
    - 4.5K bytes
    - Viewed (0)
  4. pkg/scheduler/internal/cache/interface.go

    	// RemovePod removes a pod. The pod's information would be subtracted from assigned node.
    	RemovePod(logger klog.Logger, pod *v1.Pod) error
    
    	// GetPod returns the pod from the cache with the same namespace and the
    	// same name of the specified pod.
    	GetPod(pod *v1.Pod) (*v1.Pod, error)
    
    	// IsAssumedPod returns true if the pod is assumed and not expired.
    	IsAssumedPod(pod *v1.Pod) (bool, error)
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon May 29 05:26:32 UTC 2023
    - 5.2K bytes
    - Viewed (0)
  5. staging/src/k8s.io/apiserver/pkg/storage/util_test.go

    		key := "pods/" + obj.Namespace + "/" + obj.Name
    		out := &example.Pod{}
    		err := etcdStorage.Create(context.TODO(), key, obj, out, 0)
    		require.NoError(t, err)
    		return out
    	}
    	getPod := func(name, ns string) *example.Pod {
    		key := "pods/" + ns + "/" + name
    		out := &example.Pod{}
    		err := etcdStorage.Get(context.TODO(), key, storage.GetOptions{}, out)
    		require.NoError(t, err)
    		return out
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Mar 11 12:07:39 UTC 2024
    - 6.3K bytes
    - Viewed (0)
  6. pkg/volume/util/recyclerclient/recycler_client.go

    }
    
    // recyclerClient abstracts access to a Pod by providing a narrower interface.
    // This makes it easier to mock a client for testing.
    type recyclerClient interface {
    	CreatePod(pod *v1.Pod) (*v1.Pod, error)
    	GetPod(name, namespace string) (*v1.Pod, error)
    	DeletePod(name, namespace string) error
    	// WatchPod returns a ListWatch for watching a pod.  The stopChannel is used
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jul 26 17:14:05 UTC 2022
    - 8.5K bytes
    - Viewed (0)
  7. pkg/controller/serviceaccount/tokengetter.go

    		return serviceAccount, nil
    	}
    	return c.client.CoreV1().ServiceAccounts(namespace).Get(context.TODO(), name, metav1.GetOptions{})
    }
    
    func (c clientGetter) GetPod(namespace, name string) (*v1.Pod, error) {
    	if pod, err := c.podLister.Pods(namespace).Get(name); err == nil {
    		return pod, nil
    	}
    	return c.client.CoreV1().Pods(namespace).Get(context.TODO(), name, metav1.GetOptions{})
    }
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Oct 30 21:15:10 UTC 2023
    - 3K bytes
    - Viewed (0)
  8. pkg/volume/util/recyclerclient/recycler_client_test.go

    	if c.pod == nil {
    		c.pod = pod
    		return c.pod, nil
    	}
    	// Simulate "already exists" error
    	return nil, errors.NewAlreadyExists(api.Resource("pods"), pod.Name)
    }
    
    func (c *mockRecyclerClient) GetPod(name, namespace string) (*v1.Pod, error) {
    	if c.pod != nil {
    		return c.pod, nil
    	}
    	return nil, fmt.Errorf("pod does not exist")
    }
    
    func (c *mockRecyclerClient) DeletePod(name, namespace string) error {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 31 14:16:53 UTC 2022
    - 8.5K bytes
    - Viewed (0)
  9. src/cmd/vet/testdata/method/method.go

    // Copyright 2010 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    // This file contains the code to check canonical methods.
    
    package method
    
    import "fmt"
    
    type MethodTest int
    
    func (t *MethodTest) Scan(x fmt.ScanState, c byte) { // ERROR "should have signature Scan\(fmt\.ScanState, rune\) error"
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Feb 20 15:46:42 UTC 2019
    - 394 bytes
    - Viewed (0)
  10. test/method.go

    	func() {
    		defer expectPanic()
    		a.h() // dynamic error: nil dereference in a.B.D->f()
    	}()
    	a.i()
    
    	// Non-addressable value receiver.
    	A(a).f()
    	// A(a).g() // static error: cannot call pointer method on A literal.B.C
    	func() {
    		defer expectPanic()
    		A(a).h() // dynamic error: nil dereference in A().B.D->f()
    	}()
    	A(a).i()
    
    	// Pointer receiver.
    	(&a).f()
    	(&a).g()
    	func() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 11 23:20:52 UTC 2013
    - 5.2K bytes
    - Viewed (0)
Back to top