Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IOStreams ¶
type IOStreams struct { // In think, os.Stdin In io.Reader // Out think, os.Stdout Out io.Writer // ErrOut think, os.Stderr ErrOut io.Writer }
IOStreams provides the standard names for iostreams. This is useful for embedding and for unit testing. Inconsistent and different names make it hard to read and review code
type TerminalSession ¶
type TerminalSession struct { IOStreams // contains filtered or unexported fields }
TerminalSession implements PtyHandler, holds information pertaining to the current streaming session: input/output streams, if the client is requesting a TTY, and a terminal size queue to support terminal resizing.
func NewTerminalSession ¶
func NewTerminalSession(stream IOStreams) *TerminalSession
NewTerminalSession create TerminalSession
func (*TerminalSession) Done ¶
func (t *TerminalSession) Done()
Done done, must call Done() before connection close, or Next() would not exits.
func (*TerminalSession) Next ¶
func (s *TerminalSession) Next() *remotecommand.TerminalSize
Next returns the new terminal size after the terminal has been resized. It returns nil when session stoped.
Click to show internal directories.
Click to hide internal directories.