Documentation ¶
Index ¶
- type Attachment
- type Client
- func (c *Client) CreateInitialPod(name, image string, pvc *corev1.PersistentVolumeClaim) (*corev1.Pod, error)
- func (c *Client) CreatePVC(name, size string) (*corev1.PersistentVolumeClaim, error)
- func (c *Client) CreatePod(name, image string, pvc *corev1.PersistentVolumeClaim) (*corev1.Pod, error)
- func (c *Client) DeletePod(pod *corev1.Pod) error
- func (c *Client) GetActivePTYs(pod *corev1.Pod) (int, error)
- func (c *Client) GetConfig() *rest.Config
- func (c *Client) GetPVC(name string) (*corev1.PersistentVolumeClaim, error)
- func (c *Client) GetPod(name string) (*corev1.Pod, error)
- func (c *Client) NewAttachment(pod *corev1.Pod, user string, sizeChan SizeChan) *Attachment
- func (c *Client) NewLogTail(pod *corev1.Pod, linesChan chan string) *LogTail
- func (c *Client) SendShutdownWallToPod(pod *corev1.Pod) error
- func (c *Client) WaitForPVC(pvc *corev1.PersistentVolumeClaim) error
- func (c *Client) WaitForPodInitContainer(pod *corev1.Pod) (PodStatus, error)
- type LogTail
- type PodStatus
- type SizeChan
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Attachment ¶
type Attachment struct { *Client // contains filtered or unexported fields }
Attachment represents the console (stdin/stdout) attachment to a given Pod.
func (*Attachment) SetStderr ¶
func (a *Attachment) SetStderr(writer io.Writer)
SetStderr implements tea.ExecCommand.
func (*Attachment) SetStdin ¶
func (a *Attachment) SetStdin(reader io.Reader)
SetStdin implements tea.ExecCommand.
func (*Attachment) SetStdout ¶
func (a *Attachment) SetStdout(writer io.Writer)
SetStdout implements tea.ExecCommand.
type Client ¶
Client holds a wrapped Kubernetes client.
func LoadClient ¶
LoadClient creates a new Client singleton.
func (*Client) CreateInitialPod ¶
func (c *Client) CreateInitialPod(name, image string, pvc *corev1.PersistentVolumeClaim) (*corev1.Pod, error)
Creates a Pod with an init container that provisions the user home, in the cluster with a given name, container image, and a pvc that will be mounted on /home.
func (*Client) CreatePVC ¶
func (c *Client) CreatePVC(name, size string) (*corev1.PersistentVolumeClaim, error)
Creates a PVC by name with a given size.
func (*Client) CreatePod ¶
func (c *Client) CreatePod(name, image string, pvc *corev1.PersistentVolumeClaim) (*corev1.Pod, error)
Creates a Pod in the cluster with a given name, container image, and a pvc that will be mounted on /home.
func (*Client) GetActivePTYs ¶
Query for active PTYs in a Pod.
func (*Client) GetPVC ¶
func (c *Client) GetPVC(name string) (*corev1.PersistentVolumeClaim, error)
Get a PVC by name from the cluster.
func (*Client) NewAttachment ¶
Returns a new Attachment.
func (*Client) NewLogTail ¶
NewLogTail returns a new LogTail instance.
func (*Client) SendShutdownWallToPod ¶
Send a wall about the shutdown to all session in the Pod.
func (*Client) WaitForPVC ¶
func (c *Client) WaitForPVC(pvc *corev1.PersistentVolumeClaim) error
Wait for a PersistentVolumeClaim to be ready.
type LogTail ¶
type LogTail struct { *Client // contains filtered or unexported fields }
LogTail is the struct that tails the logs for a Pod's container.
type PodStatus ¶
type PodStatus int
PodStatus represents if the Pod init container is ready, or if the Pod is ready.
type SizeChan ¶
type SizeChan chan remotecommand.TerminalSize
func (SizeChan) Next ¶
func (s SizeChan) Next() *remotecommand.TerminalSize