Documentation ¶
Index ¶
- func Chmod(factory SshConfigFactory, remotePath string, mode os.FileMode) error
- func DeleteRemoteFiles(factory SshConfigFactory, paths ...string) error
- func FilterProcessList(output string, filter func(string) bool) ([]int, error)
- func FindProcesses(factory SshConfigFactory, filter func(string) bool) ([]int, error)
- func KillService(factory SshConfigFactory, name string) error
- func LaunchService(factory SshConfigFactory, name, cfg string, sudo bool) error
- func RemoteConsole(factory SshConfigFactory, cmd string) error
- func RemoteExec(sshConfig SshConfigFactory, cmd string) (string, error)
- func RemoteExecAll(sshConfig SshConfigFactory, cmds ...string) (string, error)
- func RemoteExecAllTo(sshConfig SshConfigFactory, out io.Writer, cmds ...string) error
- func RemoteExecAllWithTimeout(sshConfig SshConfigFactory, timeout time.Duration, cmds ...string) (string, error)
- func RemoteFileList(factory SshConfigFactory, path string) ([]os.FileInfo, error)
- func RemoteKill(factory SshConfigFactory, match string) error
- func RemoteKillFilter(factory SshConfigFactory, match string, anti string) error
- func RemoteKillFilterF(factory SshConfigFactory, filter func(string) bool) error
- func RemoteKillSignalFilterF(factory SshConfigFactory, signal string, filter func(string) bool) error
- func RemoteShell(factory SshConfigFactory) error
- func RetrieveRemoteFiles(factory SshConfigFactory, localPath string, paths ...string) error
- func SendData(factory SshConfigFactory, data []byte, remotePath string) error
- func SendFile(factory SshConfigFactory, localPath string, remotePath string) error
- type SshConfigFactory
- type SshConfigFactoryImpl
- func (factory *SshConfigFactoryImpl) Address() string
- func (factory *SshConfigFactoryImpl) Config() *ssh.ClientConfig
- func (factory *SshConfigFactoryImpl) Hostname() string
- func (factory *SshConfigFactoryImpl) KeyPath() string
- func (factory *SshConfigFactoryImpl) Port() int
- func (factory *SshConfigFactoryImpl) User() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteRemoteFiles ¶
func DeleteRemoteFiles(factory SshConfigFactory, paths ...string) error
func FilterProcessList ¶
func FindProcesses ¶
func FindProcesses(factory SshConfigFactory, filter func(string) bool) ([]int, error)
func KillService ¶
func KillService(factory SshConfigFactory, name string) error
func LaunchService ¶
func LaunchService(factory SshConfigFactory, name, cfg string, sudo bool) error
func RemoteConsole ¶
func RemoteConsole(factory SshConfigFactory, cmd string) error
func RemoteExec ¶
func RemoteExec(sshConfig SshConfigFactory, cmd string) (string, error)
func RemoteExecAll ¶
func RemoteExecAll(sshConfig SshConfigFactory, cmds ...string) (string, error)
func RemoteExecAllTo ¶
func RemoteExecAllTo(sshConfig SshConfigFactory, out io.Writer, cmds ...string) error
func RemoteFileList ¶
func RemoteFileList(factory SshConfigFactory, path string) ([]os.FileInfo, error)
func RemoteKill ¶
func RemoteKill(factory SshConfigFactory, match string) error
func RemoteKillFilter ¶
func RemoteKillFilter(factory SshConfigFactory, match string, anti string) error
func RemoteKillFilterF ¶
func RemoteKillFilterF(factory SshConfigFactory, filter func(string) bool) error
func RemoteKillSignalFilterF ¶
func RemoteKillSignalFilterF(factory SshConfigFactory, signal string, filter func(string) bool) error
func RemoteShell ¶
func RemoteShell(factory SshConfigFactory) error
func RetrieveRemoteFiles ¶
func RetrieveRemoteFiles(factory SshConfigFactory, localPath string, paths ...string) error
Types ¶
type SshConfigFactory ¶
type SshConfigFactoryImpl ¶
type SshConfigFactoryImpl struct {
// contains filtered or unexported fields
}
func NewSshConfigFactory ¶
func NewSshConfigFactory(user, keyPath, host string) *SshConfigFactoryImpl
func (*SshConfigFactoryImpl) Address ¶
func (factory *SshConfigFactoryImpl) Address() string
func (*SshConfigFactoryImpl) Config ¶
func (factory *SshConfigFactoryImpl) Config() *ssh.ClientConfig
func (*SshConfigFactoryImpl) Hostname ¶
func (factory *SshConfigFactoryImpl) Hostname() string
func (*SshConfigFactoryImpl) KeyPath ¶
func (factory *SshConfigFactoryImpl) KeyPath() string
func (*SshConfigFactoryImpl) Port ¶
func (factory *SshConfigFactoryImpl) Port() int
func (*SshConfigFactoryImpl) User ¶
func (factory *SshConfigFactoryImpl) User() string
Click to show internal directories.
Click to hide internal directories.