Documentation
¶
Index ¶
- Variables
- type FakeK8sClient
- func (f *FakeK8sClient) CreatePod(pod *corev1.Pod) (*corev1.Pod, error)
- func (f *FakeK8sClient) DeletePod(pod *corev1.Pod) error
- func (f *FakeK8sClient) Flush()
- func (f *FakeK8sClient) GetPod(podName, namespace string) (*corev1.Pod, error)
- func (f *FakeK8sClient) PatchPod(pod *corev1.Pod, data []byte) error
- func (f *FakeK8sClient) UpdatePod(pod *corev1.Pod) error
- type K8sClient
Constants ¶
This section is empty.
Variables ¶
View Source
var FakeClient = &FakeK8sClient{ PodMap: make(map[string]*corev1.Pod), lock: sync.RWMutex{}, }
Functions ¶
This section is empty.
Types ¶
type FakeK8sClient ¶
type FakeK8sClient struct { PodMap map[string]*corev1.Pod // contains filtered or unexported fields }
FakeK8sClient creates a new mock k8s client used for testing
func (*FakeK8sClient) Flush ¶
func (f *FakeK8sClient) Flush()
func (*FakeK8sClient) GetPod ¶
func (f *FakeK8sClient) GetPod(podName, namespace string) (*corev1.Pod, error)
Click to show internal directories.
Click to hide internal directories.