Documentation ¶
Index ¶
- Constants
- func GetDir(id, envName string) string
- func NewSshClient(user, password string, port string) (*ssh.Client, error)
- func ReceiveWsMsgPassword(wsConn *websocket.Conn, logBuff *bytes.Buffer) string
- func ReceiveWsMsgUser(wsConn *websocket.Conn, logBuff *bytes.Buffer) string
- func WsReaderCopy(reader *websocket.Conn, writer io.Writer)
- func WsWriterCopy(reader io.Reader, writer *websocket.Conn)
- type SshConn
- func (s *SshConn) Close()
- func (ssConn *SshConn) Login(wsConn *websocket.Conn, logBuff *bytes.Buffer, exitCh chan bool)
- func (ssConn *SshConn) ReceiveWsMsg(wsConn *websocket.Conn, logBuff *bytes.Buffer, exitCh chan bool)
- func (ssConn *SshConn) SendComboOutput(wsConn *websocket.Conn, exitCh chan bool)
- func (ssConn *SshConn) SessionWait(quitChan chan bool)
Constants ¶
View Source
const NETWORKNAME = "oasis"
Variables ¶
This section is empty.
Functions ¶
func ReceiveWsMsgPassword ¶
func ReceiveWsMsgUser ¶
ReceiveWsMsg receive websocket msg do some handling then write into ssh.session.stdin
Types ¶
type SshConn ¶
type SshConn struct { // calling Write() to write data into ssh server StdinPipe io.WriteCloser // Write() be called to receive data from ssh server ComboOutput *wsBufferWriter Session *ssh.Session }
func NewSshConn ¶
setup ssh shell session set Session and StdinPipe here, and the Session.Stdout and Session.Sdterr are also set.
func (*SshConn) Login ¶
ReceiveWsMsg receive websocket msg do some handling then write into ssh.session.stdin
func (*SshConn) ReceiveWsMsg ¶
func (ssConn *SshConn) ReceiveWsMsg(wsConn *websocket.Conn, logBuff *bytes.Buffer, exitCh chan bool)
ReceiveWsMsg receive websocket msg do some handling then write into ssh.session.stdin
func (*SshConn) SendComboOutput ¶
func (*SshConn) SessionWait ¶
Click to show internal directories.
Click to hide internal directories.