Documentation ¶
Index ¶
- func DirectoryExists(machine Machine, io CommandInOut, fileName string) (bool, error)
- func FileExists(machine Machine, io CommandInOut, fileName string) (bool, error)
- func IsLocal(m Machine) bool
- func IsLocalHost(host string) bool
- func Mkdirs(machine Machine, io CommandInOut, dirName string) error
- func PublicKey(path string) (ssh.AuthMethod, error)
- func Rsync(io CommandInOut, sourceMachine Machine, ...) error
- func Scp(io CommandInOut, sourceMachine Machine, sourceFile string, ...) error
- type BufferedInOut
- func (s *BufferedInOut) Err() io.Writer
- func (s *BufferedInOut) GetCombinedOutput() string
- func (s *BufferedInOut) GetErr() string
- func (s *BufferedInOut) GetLog() string
- func (s *BufferedInOut) GetOut() string
- func (s *BufferedInOut) In() io.Reader
- func (s *BufferedInOut) Log() io.Writer
- func (s *BufferedInOut) Out() io.Writer
- type CommandExecutor
- type CommandInOut
- type Machine
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DirectoryExists ¶
func DirectoryExists(machine Machine, io CommandInOut, fileName string) (bool, error)
func FileExists ¶
func FileExists(machine Machine, io CommandInOut, fileName string) (bool, error)
func IsLocalHost ¶
Types ¶
type BufferedInOut ¶
type BufferedInOut struct {
// contains filtered or unexported fields
}
func NewBufferedInOut ¶
func NewBufferedInOut() *BufferedInOut
func NewBufferedInOutWithLog ¶
func NewBufferedInOutWithLog(log io.Writer) *BufferedInOut
func (*BufferedInOut) Err ¶
func (s *BufferedInOut) Err() io.Writer
func (*BufferedInOut) GetCombinedOutput ¶
func (s *BufferedInOut) GetCombinedOutput() string
func (*BufferedInOut) GetErr ¶
func (s *BufferedInOut) GetErr() string
func (*BufferedInOut) GetLog ¶
func (s *BufferedInOut) GetLog() string
func (*BufferedInOut) GetOut ¶
func (s *BufferedInOut) GetOut() string
func (*BufferedInOut) In ¶
func (s *BufferedInOut) In() io.Reader
func (*BufferedInOut) Log ¶
func (s *BufferedInOut) Log() io.Writer
func (*BufferedInOut) Out ¶
func (s *BufferedInOut) Out() io.Writer
type CommandExecutor ¶
type CommandExecutor interface { ExecuteCmd(io CommandInOut, dir, command string, arg ...string) (string, error) RunCmd(io CommandInOut, dir, command string, arg ...string) error }
type CommandInOut ¶
func NewCommandInOut ¶
func NewCommandInOut(out, err, log io.Writer, in io.Reader) CommandInOut
type Machine ¶
type Machine interface { CommandExecutor User() string Host() string IpAddr() string Port() int }
func NewLocalMachine ¶
func NewSshMachine ¶ added in v0.1.4
func NewSshMachine(hostname string, port int, sshConfig *ssh.ClientConfig) Machine
Click to show internal directories.
Click to hide internal directories.