terminal

package
v0.0.0-...-86d6279 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 14, 2022 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidatePod

func ValidatePod(ctx context.Context, client kubernetes.Interface, namespace, podName, containerName string) error

Types

type ExecOptions

type ExecOptions struct {
	Stdin    bool
	Stdout   bool
	Stderr   bool
	TTY      bool
	Executor ExecutorType
}

type ExecutorType

type ExecutorType string
const (
	// EndOfTransmission end
	EndOfTransmission = "\u0004"

	WebsocketExecutorType ExecutorType = "websocket"
	SPDYExecutorType      ExecutorType = "spdy"
)

type TerminalMessage

type TerminalMessage struct {
	Op   string `json:"op"`
	Data string `json:"data"`
	Rows uint16 `json:"rows"`
	Cols uint16 `json:"cols"`
}

TerminalMessage is the messaging protocol between ShellController and TerminalSession.

OP DIRECTION FIELD(S) USED DESCRIPTION --------------------------------------------------------------------- bind fe->be SessionID Id sent back from TerminalResponse stdin fe->be Data Keystrokes/paste buffer resize fe->be Rows, Cols New terminal size stdout be->fe Data Output from the process

type TerminalSession

type TerminalSession struct {
	// contains filtered or unexported fields
}

func NewTerminalSession

func NewTerminalSession(c kubernetes.Interface, w http.ResponseWriter, r *http.Request, responseHeader http.Header) (*TerminalSession, error)

func (*TerminalSession) Close

func (t *TerminalSession) Close() error

func (*TerminalSession) Done

func (t *TerminalSession) Done()

func (*TerminalSession) Exec

func (t *TerminalSession) Exec(config *rest.Config, namespace, podName, containerName string, cmd []string, opts *ExecOptions) error

func (*TerminalSession) Next

func (*TerminalSession) Read

func (t *TerminalSession) Read(p []byte) (n int, err error)

func (*TerminalSession) Write

func (t *TerminalSession) Write(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL