kubernetes/vendor/golang.org/x/crypto/ssh/session.go

type Signal

const SIGABRT

const SIGALRM

const SIGFPE

const SIGHUP

const SIGILL

const SIGINT

const SIGKILL

const SIGPIPE

const SIGQUIT

const SIGSEGV

const SIGTERM

const SIGUSR1

const SIGUSR2

var signals

type TerminalModes

const tty_OP_END

const VINTR

const VQUIT

const VERASE

const VKILL

const VEOF

const VEOL

const VEOL2

const VSTART

const VSTOP

const VSUSP

const VDSUSP

const VREPRINT

const VWERASE

const VLNEXT

const VFLUSH

const VSWTCH

const VSTATUS

const VDISCARD

const IGNPAR

const PARMRK

const INPCK

const ISTRIP

const INLCR

const IGNCR

const ICRNL

const IUCLC

const IXON

const IXANY

const IXOFF

const IMAXBEL

const IUTF8

const ISIG

const ICANON

const XCASE

const ECHO

const ECHOE

const ECHOK

const ECHONL

const NOFLSH

const TOSTOP

const IEXTEN

const ECHOCTL

const ECHOKE

const PENDIN

const OPOST

const OLCUC

const ONLCR

const OCRNL

const ONOCR

const ONLRET

const CS7

const CS8

const PARENB

const PARODD

const TTY_OP_ISPEED

const TTY_OP_OSPEED

type Session

// SendRequest sends an out-of-band channel request on the SSH channel
// underlying the session.
func (s *Session) SendRequest(name string, wantReply bool, payload []byte) (bool, error) {}

func (s *Session) Close() error {}

type setenvRequest

// Setenv sets an environment variable that will be applied to any
// command executed by Shell or Run.
func (s *Session) Setenv(name, value string) error {}

type ptyRequestMsg

// RequestPty requests the association of a pty with the session on the remote host.
func (s *Session) RequestPty(term string, h, w int, termmodes TerminalModes) error {}

type subsystemRequestMsg

// RequestSubsystem requests the association of a subsystem with the session on the remote host.
// A subsystem is a predefined command that runs in the background when the ssh session is initiated
func (s *Session) RequestSubsystem(subsystem string) error {}

type ptyWindowChangeMsg

// WindowChange informs the remote host about a terminal window dimension change to h rows and w columns.
func (s *Session) WindowChange(h, w int) error {}

type signalMsg

// Signal sends the given signal to the remote process.
// sig is one of the SIG* constants.
func (s *Session) Signal(sig Signal) error {}

type execMsg

// Start runs cmd on the remote host. Typically, the remote
// server passes cmd to the shell for interpretation.
// A Session only accepts one call to Run, Start or Shell.
func (s *Session) Start(cmd string) error {}

// Run runs cmd on the remote host. Typically, the remote
// server passes cmd to the shell for interpretation.
// A Session only accepts one call to Run, Start, Shell, Output,
// or CombinedOutput.
//
// The returned error is nil if the command runs, has no problems
// copying stdin, stdout, and stderr, and exits with a zero exit
// status.
//
// If the remote server does not send an exit status, an error of type
// *ExitMissingError is returned. If the command completes
// unsuccessfully or is interrupted by a signal, the error is of type
// *ExitError. Other error types may be returned for I/O problems.
func (s *Session) Run(cmd string) error {}

// Output runs cmd on the remote host and returns its standard output.
func (s *Session) Output(cmd string) ([]byte, error) {}

type singleWriter

func (w *singleWriter) Write(p []byte) (int, error) {}

// CombinedOutput runs cmd on the remote host and returns its combined
// standard output and standard error.
func (s *Session) CombinedOutput(cmd string) ([]byte, error) {}

// Shell starts a login shell on the remote host. A Session only
// accepts one call to Run, Start, Shell, Output, or CombinedOutput.
func (s *Session) Shell() error {}

func (s *Session) start() error {}

// Wait waits for the remote command to exit.
//
// The returned error is nil if the command runs, has no problems
// copying stdin, stdout, and stderr, and exits with a zero exit
// status.
//
// If the remote server does not send an exit status, an error of type
// *ExitMissingError is returned. If the command completes
// unsuccessfully or is interrupted by a signal, the error is of type
// *ExitError. Other error types may be returned for I/O problems.
func (s *Session) Wait() error {}

func (s *Session) wait(reqs <-chan *Request) error {}

type ExitMissingError

func (e *ExitMissingError) Error() string {}

func (s *Session) stdin() {}

func (s *Session) stdout() {}

func (s *Session) stderr() {}

type sessionStdin

func (s *sessionStdin) Close() error {}

// StdinPipe returns a pipe that will be connected to the
// remote command's standard input when the command starts.
func (s *Session) StdinPipe() (io.WriteCloser, error) {}

// StdoutPipe returns a pipe that will be connected to the
// remote command's standard output when the command starts.
// There is a fixed amount of buffering that is shared between
// stdout and stderr streams. If the StdoutPipe reader is
// not serviced fast enough it may eventually cause the
// remote command to block.
func (s *Session) StdoutPipe() (io.Reader, error) {}

// StderrPipe returns a pipe that will be connected to the
// remote command's standard error when the command starts.
// There is a fixed amount of buffering that is shared between
// stdout and stderr streams. If the StderrPipe reader is
// not serviced fast enough it may eventually cause the
// remote command to block.
func (s *Session) StderrPipe() (io.Reader, error) {}

// newSession returns a new interactive session on the remote host.
func newSession(ch Channel, reqs <-chan *Request) (*Session, error) {}

type ExitError

func (e *ExitError) Error() string {}

type Waitmsg

// ExitStatus returns the exit status of the remote command.
func (w Waitmsg) ExitStatus() int {}

// Signal returns the exit signal of the remote command if
// it was terminated violently.
func (w Waitmsg) Signal() string {}

// Msg returns the exit message given by the remote command
func (w Waitmsg) Msg() string {}

// Lang returns the language tag. See RFC 3066
func (w Waitmsg) Lang() string {}

func (w Waitmsg) String() string {}