Documentation ¶
Index ¶
- type ClientSet
- type MockClientSet
- func (cs *MockClientSet) DeletePod(podName string, namespace string) error
- func (cs *MockClientSet) GetDeployments(namespace string) (*appsv1.DeploymentList, error)
- func (cs *MockClientSet) GetNamespaces() (*corev1.NamespaceList, error)
- func (cs *MockClientSet) GetPodContainerLogs(podName string, containerName string, namespace string, o io.Writer) error
- func (cs *MockClientSet) GetPodContainers(podName string, namespace string) ([]string, error)
- func (cs *MockClientSet) GetPods(namespace string) (*corev1.PodList, error)
- type RealClientSet
- func (cs *RealClientSet) DeletePod(podName string, namespace string) error
- func (cs *RealClientSet) GetDeployments(namespace string) (*appsv1.DeploymentList, error)
- func (cs *RealClientSet) GetNamespaces() (*v1.NamespaceList, error)
- func (cs *RealClientSet) GetPodContainerLogs(podName string, containerName string, namespace string, o io.Writer) error
- func (cs *RealClientSet) GetPodContainers(podName string, namespace string) ([]string, error)
- func (cs *RealClientSet) GetPods(namespace string) (*v1.PodList, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientSet ¶
type ClientSet interface { GetPods(namespace string) (*corev1.PodList, error) GetDeployments(namespace string) (*appsv1.DeploymentList, error) GetNamespaces() (*corev1.NamespaceList, error) GetPodContainers(podName string, namespace string) ([]string, error) DeletePod(podName string, namespace string) error GetPodContainerLogs(podName string, containerName string, namespace string, o io.Writer) error }
type MockClientSet ¶
type MockClientSet struct {
// contains filtered or unexported fields
}
MockClientSet contains an embedded Kubernetes client set
func NewMock ¶
func NewMock(flags *k.ParsedFlags) (*MockClientSet, error)
NewMock returns a new clientset
func (*MockClientSet) DeletePod ¶
func (cs *MockClientSet) DeletePod(podName string, namespace string) error
DeletePod will DeletePod
func (*MockClientSet) GetDeployments ¶
func (cs *MockClientSet) GetDeployments(namespace string) (*appsv1.DeploymentList, error)
GetDeployments returns all deployments from the k8s cluster
func (*MockClientSet) GetNamespaces ¶
func (cs *MockClientSet) GetNamespaces() (*corev1.NamespaceList, error)
GetNamespaces will GetNamespaces
func (*MockClientSet) GetPodContainerLogs ¶
func (cs *MockClientSet) GetPodContainerLogs(podName string, containerName string, namespace string, o io.Writer) error
GetPodContainerLogs will GetPodContainerLogs
func (*MockClientSet) GetPodContainers ¶
func (cs *MockClientSet) GetPodContainers(podName string, namespace string) ([]string, error)
GetPodContainers will GetPodContainers
type RealClientSet ¶
type RealClientSet struct {
// contains filtered or unexported fields
}
RealClientSet contains an embedded Kubernetes client set
func (*RealClientSet) DeletePod ¶
func (cs *RealClientSet) DeletePod(podName string, namespace string) error
Delete pod
func (*RealClientSet) GetDeployments ¶
func (cs *RealClientSet) GetDeployments(namespace string) (*appsv1.DeploymentList, error)
Get pods (use namespace)
func (*RealClientSet) GetNamespaces ¶
func (cs *RealClientSet) GetNamespaces() (*v1.NamespaceList, error)
Get namespaces
func (*RealClientSet) GetPodContainerLogs ¶
func (cs *RealClientSet) GetPodContainerLogs(podName string, containerName string, namespace string, o io.Writer) error
Get pod container logs
func (*RealClientSet) GetPodContainers ¶
func (cs *RealClientSet) GetPodContainers(podName string, namespace string) ([]string, error)
Get the pod containers
Click to show internal directories.
Click to hide internal directories.