Documentation ¶
Index ¶
- func HandleError(c *gin.Context, err error) bool
- func HandlerLocalWS(c *gin.Context)
- func HandlerWS(c *gin.Context)
- func JsonError(c *gin.Context, msg interface{})
- func LogViewerHandler(c *gin.Context)
- func NewSshClient() (*ssh.Client, error)
- func WshandleError(ws *websocket.Conn, err error) bool
- type SshConn
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HandlerLocalWS ¶
func LogViewerHandler ¶
func NewSshClient ¶
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 }
connect to ssh server using 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) 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.