func (drv Driver) String() string {
	return fmt.Sprintf("SSH driver (host: %s)", drv.SSHClient.Host)
}
String returns the driver's name.
package ssh
import (
	"fmt"
	"github.com/mlafeldt/chef-runner/openssh"
	"github.com/mlafeldt/chef-runner/rsync"
)
type Driver struct {
	Host        string
	SSHClient   *openssh.Client
	RsyncClient *rsync.Client
}
func NewDriver(host string, sshOptions, rsyncOptions []string) (*Driver, error) {
	sshClient, err := openssh.NewClient(host)
	if err != nil {
		return nil, err
	}
	sshClient.Options = sshOptions
	rsyncClient := *rsync.MirrorClient
	rsyncClient.RemoteHost = sshClient.Host
	rsyncClient.RemoteShell = sshClient.Shell()
	rsyncClient.Options = rsyncOptions
	return &Driver{host, sshClient, &rsyncClient}, nil
}
func (drv Driver) RunCommand(args []string) error {
	return drv.SSHClient.RunCommand(args)
}
func (drv Driver) Upload(dst string, src ...string) error {
	return drv.RsyncClient.Copy(dst, src...)
}