Versions in this module Expand all Collapse all v0 v0.1.0 Dec 31, 2019 Changes in this version + var IsTesting = false + type ExecClient struct + SFTPClient *sftp.Client + SSHClient *ssh.Client + func NewExecClient(node *pb.Node) (*ExecClient, error) + func (m *ExecClient) Close() + func (m *ExecClient) ReadFile(filename string) (content []byte, err error) + func (m *ExecClient) WriteFile(filename string, data []byte, perm os.FileMode) (err error) + type IMachine interface + Close func() + FetchDir func(localDir, remoteDir string, fileNeeded func(path string) bool) error + FetchFile func(dst io.Writer, remotePath string) error + FetchFileToLocalPath func(localPath, remotePath string) error + GetIp func() string + GetName func() string + GetNode func() *pb.Node + PutDir func(localDir, remoteDir string, fileNeeded func(path string) bool) error + PutFile func(content io.Reader, remotePath string) error + Run func(cmd string) (stdout, stderr []byte, err error) + func NewMachine(node *pb.Node) (IMachine, error) + type Machine struct + func (m *Machine) Close() + func (m *Machine) FetchDir(localDir, remoteDir string, fileNeeded func(path string) bool) error + func (m *Machine) FetchFile(dst io.Writer, remotePath string) error + func (m *Machine) FetchFileToLocalPath(localPath, remotePath string) error + func (m *Machine) GetIp() string + func (m *Machine) GetName() string + func (m *Machine) GetNode() *pb.Node + func (m *Machine) PutDir(localDir, remoteDir string, fileNeeded func(path string) bool) error + func (m *Machine) PutFile(content io.Reader, remotePath string) error + func (m *Machine) Run(cmd string) (stdout, stderr []byte, err error) + type MockMachine struct + DockerClient *dockerclient.Client + func (m *MockMachine) Close() + func (m *MockMachine) FetchDir(localDir, remoteDir string, fileNeeded func(path string) bool) error + func (m *MockMachine) FetchFile(dst io.Writer, remotePath string) error + func (m *MockMachine) FetchFileToLocalPath(localPath, remotePath string) error + func (m *MockMachine) GetIp() string + func (m *MockMachine) GetName() string + func (m *MockMachine) GetNode() *pb.Node + func (m *MockMachine) PutDir(localDir, remoteDir string, fileNeeded func(path string) bool) error + func (m *MockMachine) PutFile(content io.Reader, remotePath string) error + func (m *MockMachine) Run(cmd string) (stdout, stderr []byte, err error) + func (m *MockMachine) StartDockerTunnel() error