Documentation
¶
Index ¶
- type SSHExecutor
- func (s *SSHExecutor) Close() error
- func (s *SSHExecutor) Connect() error
- func (s *SSHExecutor) DownloadFile(remoteFilePath, localFilePath string) error
- func (s *SSHExecutor) GetConfig() (*ssh.ClientConfig, error)
- func (s *SSHExecutor) RunCommand(cmd string) (string, string, error)
- func (s *SSHExecutor) RunExecutable(path string) error
- func (s *SSHExecutor) String() string
- func (s *SSHExecutor) UploadFile(localFilePath, remoteFilePath string) error
- func (s *SSHExecutor) WithIP(ip string) *SSHExecutor
- func (s *SSHExecutor) WithPort(port int) *SSHExecutor
- func (s *SSHExecutor) WithPrivateKeyPath(path string) *SSHExecutor
- func (s *SSHExecutor) WithUser(user string) *SSHExecutor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SSHExecutor ¶
type SSHExecutor struct {
IP string
Port int
User string
PrivateKeyPath string
// contains filtered or unexported fields
}
func NewSSHExecutor ¶
func NewSSHExecutor() *SSHExecutor
func (*SSHExecutor) Close ¶
func (s *SSHExecutor) Close() error
func (*SSHExecutor) Connect ¶
func (s *SSHExecutor) Connect() error
Connect now uses the SSHConnectionPool to get the connection
func (*SSHExecutor) DownloadFile ¶
func (s *SSHExecutor) DownloadFile(remoteFilePath, localFilePath string) error
func (*SSHExecutor) GetConfig ¶
func (s *SSHExecutor) GetConfig() (*ssh.ClientConfig, error)
func (*SSHExecutor) RunCommand ¶
func (s *SSHExecutor) RunCommand(cmd string) (string, string, error)
func (*SSHExecutor) RunExecutable ¶
func (s *SSHExecutor) RunExecutable(path string) error
func (*SSHExecutor) String ¶
func (s *SSHExecutor) String() string
func (*SSHExecutor) UploadFile ¶
func (s *SSHExecutor) UploadFile(localFilePath, remoteFilePath string) error
func (*SSHExecutor) WithIP ¶
func (s *SSHExecutor) WithIP(ip string) *SSHExecutor
func (*SSHExecutor) WithPort ¶
func (s *SSHExecutor) WithPort(port int) *SSHExecutor
func (*SSHExecutor) WithPrivateKeyPath ¶
func (s *SSHExecutor) WithPrivateKeyPath(path string) *SSHExecutor
func (*SSHExecutor) WithUser ¶
func (s *SSHExecutor) WithUser(user string) *SSHExecutor
Click to show internal directories.
Click to hide internal directories.