Documentation ¶
Index ¶
- type ShellSession
- type SshClient
- func (this *SshClient) Clear()
- func (this *SshClient) ClearSftpClients()
- func (this *SshClient) Connect() *promise.Promise
- func (this *SshClient) Disconnect() *promise.Promise
- func (this *SshClient) GetConnStr() string
- func (this *SshClient) Gzip(files []*os.File, dest string) error
- func (this *SshClient) IsConnect() bool
- func (this *SshClient) NewShellSession() *ShellSession
- func (this *SshClient) Remove(remotePath string) error
- func (this *SshClient) RemoveSub(remotePath string) error
- func (this *SshClient) RunCmd(cmd string) *promise.Promise
- func (this *SshClient) RunCmdPwd() *promise.Promise
- func (this *SshClient) RunShellCmd(cmd string, expect bool) *promise.Promise
- func (this *SshClient) RunShellCmdPwd() *promise.Promise
- func (this *SshClient) SetAddr(user, password, addr string)
- func (this *SshClient) SetStringWriter(writer StringWriter)
- func (this *SshClient) UnGzip(file, dest string) error
- func (this *SshClient) UnZip(file, dest string) error
- func (this *SshClient) Upload(localPath string, remotePath string) error
- func (this *SshClient) UploadSub(localPath string, remotePath string) error
- func (this *SshClient) Write(p []byte) (int, error)
- func (this *SshClient) Zip(files []*os.File, dest string) error
- type StringWriter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ShellSession ¶
type ShellSession struct {
// contains filtered or unexported fields
}
func (*ShellSession) Run ¶
func (this *ShellSession) Run(cmd string, isExpect bool) *promise.Promise
func (*ShellSession) SetCmd ¶
func (this *ShellSession) SetCmd(cmd *shell.ShellCommand)
func (*ShellSession) SetWriter ¶
func (this *ShellSession) SetWriter(writer io.Writer)
func (*ShellSession) Start ¶
func (this *ShellSession) Start() error
type SshClient ¶
type SshClient struct { *log.ComposeLogger events.EventEmmiter User string // contains filtered or unexported fields }
func NewSshClient ¶
func (*SshClient) ClearSftpClients ¶
func (this *SshClient) ClearSftpClients()
func (*SshClient) Disconnect ¶
func (*SshClient) GetConnStr ¶
func (*SshClient) NewShellSession ¶
func (this *SshClient) NewShellSession() *ShellSession
func (*SshClient) RunShellCmd ¶
func (*SshClient) RunShellCmdPwd ¶
func (*SshClient) SetStringWriter ¶
func (this *SshClient) SetStringWriter(writer StringWriter)
type StringWriter ¶
type StringWriter interface {
WriteString(string)
}
Click to show internal directories.
Click to hide internal directories.