Documentation
¶
Index ¶
- Variables
- type SSHClient
- func (sc *SSHClient) Close()
- func (sc *SSHClient) ExecInteractiveCmd(cmd string) error
- func (sc *SSHClient) ExecNointeractiveCmd(cmd string, timeout time.Duration) (status runner.OutputStaus, stdout, stderr *bytes.Buffer, err error)
- func (sc *SSHClient) Get(localPath, remotePath string) error
- func (sc *SSHClient) Put(localPath, remotePath string) error
- type SSHRunner
- func (sr *SSHRunner) ConcurrentExec(input runner.ExecInput, outputChan chan *runner.ConcurrentOutput, ...)
- func (sr *SSHRunner) Login(shell string) error
- func (sr *SSHRunner) SyncExec(input runner.ExecInput) *runner.ExecOutput
- func (sr *SSHRunner) SyncGet(input runner.RcpInput) *runner.RcpOutput
- func (sr *SSHRunner) SyncPut(input runner.RcpInput) *runner.RcpOutput
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrLocalPathIsFile = "local path cannot be a file when remote path is directory"
)
Functions ¶
This section is empty.
Types ¶
type SSHClient ¶ added in v0.6.0
type SSHClient struct {
User string
Password string
SSHKeyPath string
Host string
Port int
// contains filtered or unexported fields
}
func NewSSHClient ¶ added in v0.6.0
func (*SSHClient) ExecInteractiveCmd ¶ added in v0.6.0
ExecInteractiveCmd exec command with interactive
func (*SSHClient) ExecNointeractiveCmd ¶ added in v0.6.0
func (sc *SSHClient) ExecNointeractiveCmd(cmd string, timeout time.Duration) (status runner.OutputStaus, stdout, stderr *bytes.Buffer, err error)
ExecNointeractiveCmd exec command without interactive
type SSHRunner ¶
type SSHRunner struct {
// contains filtered or unexported fields
}
SSHRunner execute command by ssh
func (*SSHRunner) ConcurrentExec ¶ added in v0.4.0
func (sr *SSHRunner) ConcurrentExec(input runner.ExecInput, outputChan chan *runner.ConcurrentOutput, limitChan chan int)
ConcurrentExec execute command sync
func (*SSHRunner) SyncExec ¶
func (sr *SSHRunner) SyncExec(input runner.ExecInput) *runner.ExecOutput
SyncExec execute command sync
Click to show internal directories.
Click to hide internal directories.