Documentation ¶
Overview ¶
Copyright 2023 Operant AI
Copyright 2023 Operant AI ¶
Copyright 2023 Operant AI
Index ¶
- Variables
- type Client
- func (c *Client) ExecuteRemoteCommand(ctx context.Context, namespace, podName, container string, commands []string) (string, string, error)
- func (c *Client) FindContainerByName(containers []corev1.Container, containerName string) (corev1.Container, error)
- func (c *Client) GetDeploymentsPods(ctx context.Context, namespace string, deployment *appsv1.Deployment) ([]corev1.Pod, error)
- func (c *Client) GetK8sVersion() (*k8sVersion.Info, error)
- func (c *Client) NewPortForwarder(ctx context.Context) *portForwarder
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrContainerNotFound = errors.New("container not found")
ErrContainerNotFound is returned when a container is not found
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { Clientset *kubernetes.Clientset RestConfig *rest.Config }
func NewClientInContainer ¶
func (*Client) ExecuteRemoteCommand ¶
func (*Client) FindContainerByName ¶
func (c *Client) FindContainerByName(containers []corev1.Container, containerName string) (corev1.Container, error)
FindContainerByName returns a container by name from a list of containers
func (*Client) GetDeploymentsPods ¶
func (c *Client) GetDeploymentsPods(ctx context.Context, namespace string, deployment *appsv1.Deployment) ([]corev1.Pod, error)
GetDeploymentsPods gets the pods belonging to the provided deployment
func (*Client) GetK8sVersion ¶
func (c *Client) GetK8sVersion() (*k8sVersion.Info, error)
func (*Client) NewPortForwarder ¶
Click to show internal directories.
Click to hide internal directories.