term

package
v0.0.0-...-0abe8d6 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2019 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// UnknownInput Unknown message type, maybe sent by a bug
	UnknownInput = '0'
	// Input User input typically from a keyboard
	Input = '1'
	// Ping to the server
	Ping = '2'
	// ResizeTerminal Notify that the browser size has been changed
	ResizeTerminal = '3'
)
View Source
const (
	// UnknownOutput unknown message type, maybe set by a bug
	UnknownOutput = '0'
	// Output Normal output to the terminal
	Output = '1'
	// Pong to the browser
	Pong = '2'
	// SetWindowTitle Set window title of the terminal
	SetWindowTitle = '3'
	// SetPreferences Set terminal preference
	SetPreferences = '4'
	// SetReconnect Make terminal to reconnect
	SetReconnect = '5'
)

Variables

View Source
var Protocols = []string{"webtty"}

Protocols string

Functions

This section is empty.

Types

type DockerTty

type DockerTty struct {
	User string
	Role string
	ID   string

	Hr     types.HijackedResponse
	Stdin  io.Reader
	Stdout io.Writer
	Stderr io.Writer

	Kind     int
	SFTP     bool
	Writable bool
	Cols     int64
	Rows     int64

	Ctx context.Context
	Cf  context.CancelFunc
	// contains filtered or unexported fields
}

DockerTty .

func New

func New() *DockerTty

New returns a DockerTty

func (*DockerTty) Close

func (tty *DockerTty) Close()

Close close the DockerTty

func (*DockerTty) DockerExecAttach

func (tty *DockerTty) DockerExecAttach(name string, ec *types.ExecConfig) error

DockerExecAttach .

func (*DockerTty) DockerExecResize

func (tty *DockerTty) DockerExecResize(w, h int64) error

DockerExecResize .

func (*DockerTty) DockerGetK8sContainers

func (tty *DockerTty) DockerGetK8sContainers(pod, container string) ([]types.Container, error)

DockerGetK8sContainers .

func (*DockerTty) DockerInit

func (tty *DockerTty) DockerInit(host string, version string, httpClient *http.Client, httpHeaders map[string]string) error

DockerInit .

func (*DockerTty) Start

func (tty *DockerTty) Start()

Start .

func (*DockerTty) Stdio

func (tty *DockerTty) Stdio(stdin io.Reader, stdout, stderr io.Writer)

Stdio .

func (*DockerTty) Wc

func (tty *DockerTty) Wc(wc *Wc) *DockerTty

Wc ..

type ExecConfig

type ExecConfig struct {
	types.ExecConfig
}

ExecConfig ...

type InitMessage

type InitMessage struct {
	Arguments string `json:"Arguments,omitempty"`
	AuthToken string `json:"AuthToken,omitempty"`
}

InitMessage .

type ResizeOption

type ResizeOption struct {
	Width  int64
	Height int64
}

ResizeOption .

type Wc

type Wc struct {
	Conn *websocket.Conn
}

Wc .

func (*Wc) Read

func (wc *Wc) Read(p []byte) (n int, err error)

func (*Wc) Write

func (wc *Wc) Write(data []byte) (int, error)

Jump to

Keyboard shortcuts

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