Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BaseSession ¶
type BaseSession interface { SessionID() string Session() *os.File Out() *broadcast.Broadcaster Execute(string) error Close() }
BaseSession allows communcation with a PTY session.
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
Session is a PTY that allows command execution through Session.Execute while sending output through the Session.Out channel.
func CreateSession ¶
CreateSession creates a new Session injected with the given sessionID, the given shell and defaults.
func (*Session) Execute ¶
Execute executes toBeExecuted in the pty. Output is written to Session.Out.
func (*Session) Out ¶
func (ptySession *Session) Out() *broadcast.Broadcaster
Out returns a broadcaster used for communicating output to command execution in the PTY.
Click to show internal directories.
Click to hide internal directories.