Documentation
¶
Index ¶
- Variables
- type SFTPClient
- type SSHClient
- type SSHRunner
- func (sr *SSHRunner) ConcurrentExec(input runner.ExecInput, outputChan chan *runner.ConcurrentExecOutput, ...)
- func (sr *SSHRunner) ConcurrentGet(input runner.RcpInput, outputChan chan *runner.ConcurrentRcpOutput, ...)
- func (sr *SSHRunner) ConcurrentPut(input runner.RcpInput, outputChan chan *runner.ConcurrentRcpOutput, ...)
- func (sr *SSHRunner) Login(shell string) error
- func (sr *SSHRunner) RemotePathSize(input runner.RcpInput) (int64, 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 remote path is directory
ErrLocalPathIsFile = "local path cannot be a file when remote path is directory"
)
Functions ¶
This section is empty.
Types ¶
type SFTPClient ¶ added in v0.6.5
type SFTPClient struct { FileTransBuf int // contains filtered or unexported fields }
func NewSFTPClient ¶ added in v0.6.5
func NewSFTPClient(sc *SSHClient, fileTransBuf int) *SFTPClient
func (*SFTPClient) Close ¶ added in v0.6.5
func (sf *SFTPClient) Close()
func (*SFTPClient) Get ¶ added in v0.6.5
func (sf *SFTPClient) Get(localPath, remotePath string, bar *pb.ProgressBar) error
Get transfer file/directory from remote server
func (*SFTPClient) Put ¶ added in v0.6.5
func (sf *SFTPClient) Put(localPath, remotePath string, bar *pb.ProgressBar) error
Put transfer file/directory to remote server
func (*SFTPClient) RemotePathSize ¶ added in v0.6.5
func (sf *SFTPClient) RemotePathSize(remotePath string) (int64, error)
RemotePathSize remote path size with all file in it
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
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.ConcurrentExecOutput, limitChan chan int)
ConcurrentExec execute command sync
func (*SSHRunner) ConcurrentGet ¶ added in v0.6.5
func (sr *SSHRunner) ConcurrentGet(input runner.RcpInput, outputChan chan *runner.ConcurrentRcpOutput, limitChan chan int, pool *pb.Pool)
ConcurrentGet copy file to remote server concurrency
func (*SSHRunner) ConcurrentPut ¶ added in v0.6.5
func (sr *SSHRunner) ConcurrentPut(input runner.RcpInput, outputChan chan *runner.ConcurrentRcpOutput, limitChan chan int, pool *pb.Pool)
ConcurrentPut copy file from remote server concurrency
func (*SSHRunner) RemotePathSize ¶ added in v0.6.5
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.