Documentation
¶
Index ¶
- Constants
- func EncodeUserEmailtoID(email string) string
- func Terminal(ctx context.Context, ws *websocket.Conn, client ctrlruntimeclient.Client, ...)
- func WriteSettings(ctx context.Context, providers watcher.Providers, ws *websocket.Conn)
- func WriteUser(ctx context.Context, providers watcher.Providers, ws *websocket.Conn, ...)
- type PtyHandler
- type TerminalMessage
- type TerminalSession
Constants ¶
const END_OF_TRANSMISSION = "\u0004"
Variables ¶
This section is empty.
Functions ¶
func EncodeUserEmailtoID ¶ added in v2.21.0
func Terminal ¶ added in v2.21.0
func Terminal(ctx context.Context, ws *websocket.Conn, client ctrlruntimeclient.Client, k8sClient kubernetes.Interface, cfg *restclient.Config, podName string)
Terminal is called for any new websocket connection.
func WriteSettings ¶
Types ¶
type PtyHandler ¶ added in v2.21.0
type PtyHandler interface { io.Reader io.Writer remotecommand.TerminalSizeQueue }
PtyHandler is what remote command expects from a pty.
type TerminalMessage ¶ added in v2.21.0
TerminalMessage is the messaging protocol between ShellController and TerminalSession.
OP DIRECTION FIELD(S) USED DESCRIPTION --------------------------------------------------------------------- stdin fe->be Data Keystrokes/paste buffer resize fe->be Rows, Cols New terminal size stdout be->fe Data Output from the process toast be->fe Data OOB message to be shown to the user.
type TerminalSession ¶ added in v2.21.0
type TerminalSession struct {
// contains filtered or unexported fields
}
TerminalSession implements PtyHandler (using a websocket connection).
func (TerminalSession) Next ¶ added in v2.21.0
func (t TerminalSession) Next() *remotecommand.TerminalSize
TerminalSize handles pty->process resize events. Called in a loop from remotecommand as long as the process is running.
func (TerminalSession) Read ¶ added in v2.21.0
func (t TerminalSession) Read(p []byte) (int, error)
Read handles pty->process messages (stdin, resize). Called in a loop from remotecommand as long as the process is running.
func (TerminalSession) Toast ¶ added in v2.21.0
func (t TerminalSession) Toast(p string) error
Toast can be used to send the user any OOB messages. hterm puts these in the center of the terminal.