Documentation
¶
Index ¶
- Constants
- func ValidatePod(pod *corev1.Pod, containerName string) (bool, error)
- type Client
- func (c *Client) CopyFileToPod(pod, container, namespace string, file io.Reader, dstPath string) error
- func (c *Client) Exec(cmd []string, ptyHandler PtyHandler, namespace, podName, containerName string) error
- func (c *Client) GetPod(ctx context.Context, name, namespace string) (*corev1.Pod, error)
- func (c *Client) LogStreamLine(ctx context.Context, name, namespace string, opts *corev1.PodLogOptions, ...) error
- func (c *Client) Logs(name, namespace string, opts *corev1.PodLogOptions) *rest.Request
- type Logger
- type PtyHandler
- type TerminalMessage
- type WsLogger
Constants ¶
View Source
const (
// EndOfTransmission end
EndOfTransmission = "\u0004"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct { kubernetes.Interface // contains filtered or unexported fields }
Client wraps k8s client and namespace
func (*Client) CopyFileToPod ¶
func (c *Client) CopyFileToPod(pod, container, namespace string, file io.Reader, dstPath string) error
CopyFileToPod copies client file to pod
func (*Client) Exec ¶
func (c *Client) Exec(cmd []string, ptyHandler PtyHandler, namespace, podName, containerName string) error
Exec into a pod
type PtyHandler ¶
type PtyHandler interface { remotecommand.TerminalSizeQueue Done() Tty() bool Stdin() io.Reader Stdout() io.Writer Stderr() io.Writer }
PtyHandler is what remotecommand expects from a pty
type TerminalMessage ¶
type TerminalMessage struct { Operation string `json:"operation"` Data string `json:"data"` Rows uint16 `json:"rows"` Cols uint16 `json:"cols"` }
TerminalMessage is the messaging protocol between ShellController and TerminalSession.
Click to show internal directories.
Click to hide internal directories.