Documentation ¶
Index ¶
- Constants
- func NewNativeConfig(user string, auth *Auth) (ssh.ClientConfig, error)
- type Auth
- type Client
- type NativeClient
- func (client *NativeClient) Output(command string) (string, error)
- func (client *NativeClient) OutputWithPty(command string) (string, error)
- func (client *NativeClient) Shell(args ...string) error
- func (client *NativeClient) Start(command string) (io.ReadCloser, io.ReadCloser, error)
- func (client *NativeClient) Wait() error
Constants ¶
View Source
const (
ErrCreatingNativeGoClient = utils.Error("Error creating native Go SSH client")
)
Variables ¶
This section is empty.
Functions ¶
func NewNativeConfig ¶
func NewNativeConfig(user string, auth *Auth) (ssh.ClientConfig, error)
Types ¶
type Client ¶
type Client interface { Output(command string) (string, error) OutputWithPty(command string) (string, error) Shell(args ...string) error // Start starts the specified command without waiting for it to finish. You // have to call the Wait function for that. // // The first two io.ReadCloser are the standard output and the standard // error of the executing command respectively. The returned error follows // the same logic as in the exec.Cmd.Start function. Start(command string) (io.ReadCloser, io.ReadCloser, error) // Wait waits for the command started by the Start function to exit. The // returned error follows the same logic as in the exec.Cmd.Wait function. Wait() error }
type NativeClient ¶
type NativeClient struct { Config ssh.ClientConfig Hostname string Port int // contains filtered or unexported fields }
func (*NativeClient) OutputWithPty ¶
func (client *NativeClient) OutputWithPty(command string) (string, error)
func (*NativeClient) Shell ¶
func (client *NativeClient) Shell(args ...string) error
func (*NativeClient) Start ¶
func (client *NativeClient) Start(command string) (io.ReadCloser, io.ReadCloser, error)
func (*NativeClient) Wait ¶
func (client *NativeClient) Wait() error
Click to show internal directories.
Click to hide internal directories.