Documentation ¶
Index ¶
- func NewClientConfig(username, password, pemfile string) (*ssh.ClientConfig, error)
- type Command
- func (c *Command) Execute(cmd string, args ...string) error
- func (c *Command) ProcessStdErr(notifier chan error, r io.Reader)
- func (c *Command) ProcessStdIn(notifier chan error, w io.WriteCloser)
- func (c *Command) ProcessStdOut(notifier chan error, r io.Reader)
- func (c *Command) SetTimeout(timeout time.Duration)
- type SSHCommand
- func (s *SSHCommand) Close()
- func (s *SSHCommand) Execute(cmd string) (err error)
- func (s *SSHCommand) ProcessStdErr(notifier chan error, r io.Reader)
- func (c *SSHCommand) ProcessStdIn(notifier chan error, w io.WriteCloser)
- func (s *SSHCommand) ProcessStdOut(notifier chan error, r io.Reader)
- func (s *SSHCommand) SetTimeout(timeout time.Duration)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewClientConfig ¶
func NewClientConfig(username, password, pemfile string) (*ssh.ClientConfig, error)
Types ¶
type Command ¶
type Command struct { Session *exec.Cmd Stdin chan string Stdout chan string Stderr chan string ErrDelimiter byte OutDelimiter byte ErrMaxBytes int OutMaxBytes int // contains filtered or unexported fields }
func NewCommand ¶
func (*Command) ProcessStdIn ¶
func (c *Command) ProcessStdIn(notifier chan error, w io.WriteCloser)
func (*Command) SetTimeout ¶
type SSHCommand ¶
type SSHCommand struct { Command Config *ssh.ClientConfig Server string Session *ssh.Session // contains filtered or unexported fields }
func NewSSHCommand ¶
func NewSSHCommand(cfg *ssh.ClientConfig, server string, inchan, outchan, errchan chan string) (*SSHCommand, error)
func (*SSHCommand) Close ¶
func (s *SSHCommand) Close()
func (*SSHCommand) Execute ¶
func (s *SSHCommand) Execute(cmd string) (err error)
func (*SSHCommand) ProcessStdErr ¶
func (s *SSHCommand) ProcessStdErr(notifier chan error, r io.Reader)
func (*SSHCommand) ProcessStdIn ¶
func (c *SSHCommand) ProcessStdIn(notifier chan error, w io.WriteCloser)
func (*SSHCommand) ProcessStdOut ¶
func (s *SSHCommand) ProcessStdOut(notifier chan error, r io.Reader)
func (*SSHCommand) SetTimeout ¶
func (s *SSHCommand) SetTimeout(timeout time.Duration)
Click to show internal directories.
Click to hide internal directories.