Documentation
¶
Index ¶
- type SSHClient
- func (s *SSHClient) AuthorizedKey() string
- func (s *SSHClient) Exec(ctx context.Context, cmd string) (string, error)
- func (s *SSHClient) ExecVerbose(_ context.Context, cmd string) (stdout string, stderr string, exitCode int, err error)
- func (s *SSHClient) RemoveAddr() string
- func (s *SSHClient) Run(ctx context.Context, cmds ...string) error
- func (s *SSHClient) WriteFile(content io.Reader, dstFilePath string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SSHClient ¶
type SSHClient struct {
// contains filtered or unexported fields
}
func NewSSHClient ¶
func (*SSHClient) AuthorizedKey ¶
AuthorizedKey returns the public key in authorized_keys format
func (*SSHClient) ExecVerbose ¶
func (s *SSHClient) ExecVerbose(_ context.Context, cmd string) (stdout string, stderr string, exitCode int, err error)
ExecVerbose executes a command and returns stdout, stderr, exitCode or not nil error
func (*SSHClient) RemoveAddr ¶
Click to show internal directories.
Click to hide internal directories.