Documentation ¶
Index ¶
- func CloudbotsDutProxyClient(ctx context.Context, dutName string) (*ssh.Client, error)
- func GetSSHAddr(ctx context.Context, name string, wiringAddress string) (string, error)
- func GetSSHConfig() *ssh.ClientConfig
- func PathExistsCommand(path string) string
- func RunSerializerCommand(path string, chunkSize int64, fetchCore bool) string
- type ClientInterface
- type CmdExecutor
- type CmdResult
- type SSHClient
- type SSHSession
- func (s *SSHSession) Close() error
- func (s *SSHSession) Output(cmd string) ([]byte, error)
- func (s *SSHSession) Run(cmd string) error
- func (s *SSHSession) SetStderr(writer io.Writer)
- func (s *SSHSession) SetStdin(reader io.Reader)
- func (s *SSHSession) SetStdout(writer io.Writer)
- func (s *SSHSession) Start(cmd string) error
- func (s *SSHSession) StderrPipe() (io.Reader, error)
- func (s *SSHSession) StdoutPipe() (io.Reader, error)
- type SessionInterface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CloudbotsDutProxyClient ¶
CloudbotsDutProxyClient returns the ssh connection from cloudbots to dut.
func GetSSHAddr ¶
GetSSHAddr returns the SSH address to use for the DUT, through the wiring service.
func GetSSHConfig ¶
func GetSSHConfig() *ssh.ClientConfig
GetSSHConfig construct a static ssh config
func PathExistsCommand ¶
Types ¶
type ClientInterface ¶
type ClientInterface interface { Close() error NewSession() (SessionInterface, error) Wait() error IsAlive() bool }
This file only exists because go cannot mock structs and the ssh client library does not provide interfaces for testing.
type CmdExecutor ¶
Simple interface abstracting away many details around SSH/streaming for clients that execute many simple/quick commands. This insulate clients from the full complexity of DutServer and also makes it easier to test logic that's focused on command execution results. E.g. Identity scanning
type SSHClient ¶
func (*SSHClient) NewSession ¶
func (c *SSHClient) NewSession() (SessionInterface, error)
type SSHSession ¶
func (*SSHSession) Close ¶
func (s *SSHSession) Close() error
func (*SSHSession) Run ¶
func (s *SSHSession) Run(cmd string) error
func (*SSHSession) SetStderr ¶
func (s *SSHSession) SetStderr(writer io.Writer)
func (*SSHSession) SetStdin ¶
func (s *SSHSession) SetStdin(reader io.Reader)
func (*SSHSession) SetStdout ¶
func (s *SSHSession) SetStdout(writer io.Writer)
func (*SSHSession) Start ¶
func (s *SSHSession) Start(cmd string) error
func (*SSHSession) StderrPipe ¶
func (s *SSHSession) StderrPipe() (io.Reader, error)
func (*SSHSession) StdoutPipe ¶
func (s *SSHSession) StdoutPipe() (io.Reader, error)
type SessionInterface ¶
Directories ¶
Path | Synopsis |
---|---|
Package mock_dutssh is a generated GoMock package.
|
Package mock_dutssh is a generated GoMock package. |
Click to show internal directories.
Click to hide internal directories.