Documentation
¶
Index ¶
- func NewConsolePortDownError() error
- func ThrowBadConsolePortException(lastRead []byte) error
- func ThrowConsoleException(lastRead []byte) error
- func ThrowConsolePortIsBusyException(lastRead []byte) error
- func ThrowConsolePortIsLockedException(lastRead []byte) error
- type BadConsolePortException
- type CommandInfoPort
- type CommandInfoResult
- type CommandsInfoResult
- type ConsoleException
- type ConsolePortDownError
- type ConsolePortIsBusyException
- type ConsolePortIsLockedException
- type Streamer
- func (m *Streamer) CheckConsoleError(readRes streamer.ReadRes) error
- func (m *Streamer) Close()
- func (m *Streamer) Cmd(ctx context.Context, str string) (cmd.CmdRes, error)
- func (m *Streamer) ConsoleCmd(ctx context.Context, command string, sendNewLine bool) ([]byte, error)
- func (m *Streamer) DiscoveryAllPorts(ctx context.Context) (CommandsInfoResult, error)
- func (m *Streamer) Download(paths []string, recurse bool) (map[string]streamer.File, error)
- func (m *Streamer) FlushBuffer()
- func (m *Streamer) GetBuffer() []byte
- func (m *Streamer) GetCredentials() credentials.Credentials
- func (m *Streamer) HasFeature(feature streamer.Const) bool
- func (m *Streamer) Init(ctx context.Context) error
- func (m *Streamer) InitAgentForward() error
- func (m *Streamer) PrependBuffer(data []byte)
- func (m *Streamer) Read(ctx context.Context, size int) ([]byte, error)
- func (m *Streamer) ReadTo(ctx context.Context, exp expr.Expr) (streamer.ReadRes, error)
- func (m *Streamer) SendCharacter(ctx context.Context, char byte) ([]byte, error)
- func (m *Streamer) SetCredentialsInterceptor(inter func(credentials.Credentials) credentials.Credentials)
- func (m *Streamer) SetReadTimeout(readTimeout time.Duration) time.Duration
- func (m *Streamer) SetTrace(cb trace.CB)
- func (m *Streamer) UpdatePortCredentials(creds credentials.Credentials)
- func (m *Streamer) Upload(m2 map[string]streamer.File) error
- func (m *Streamer) Write(text []byte) error
- func (m *Streamer) XRead(ctx context.Context, size int, duration time.Duration, expr expr.Expr) (*streamer.ReadXRes, error)
- type StreamerOption
- func WithAddresses(addresses []net.IP) StreamerOption
- func WithForceAttache() StreamerOption
- func WithHackedSSL() StreamerOption
- func WithLogger(log *zap.Logger) StreamerOption
- func WithPort(port int) StreamerOption
- func WithSSHTunnel(tunnelHost string) StreamerOption
- func WithSSHTunnelConn(tunnel sshtunnel.Tunnel) StreamerOption
- func WithSpeed(speed int) StreamerOption
- func WithTrace(trace trace.CB) StreamerOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewConsolePortDownError ¶
func NewConsolePortDownError() error
func ThrowConsoleException ¶
Types ¶
type BadConsolePortException ¶
type BadConsolePortException struct {
// contains filtered or unexported fields
}
func (*BadConsolePortException) Error ¶
func (e *BadConsolePortException) Error() string
type CommandInfoPort ¶
type CommandInfoResult ¶
type CommandInfoResult struct {
// contains filtered or unexported fields
}
func (CommandInfoResult) GetPCLwr ¶
func (m CommandInfoResult) GetPCLwr() string
func (CommandInfoResult) GetPort ¶
func (m CommandInfoResult) GetPort() int
func (CommandInfoResult) GetPortName ¶
func (m CommandInfoResult) GetPortName() string
func (CommandInfoResult) GetSpeed ¶
func (m CommandInfoResult) GetSpeed() int
type CommandsInfoResult ¶
type CommandsInfoResult map[string]CommandInfoPort
type ConsoleException ¶
type ConsoleException struct {
// contains filtered or unexported fields
}
func (*ConsoleException) Error ¶
func (e *ConsoleException) Error() string
type ConsolePortDownError ¶
type ConsolePortDownError struct {
}
func (*ConsolePortDownError) Error ¶
func (e *ConsolePortDownError) Error() string
type ConsolePortIsBusyException ¶
type ConsolePortIsBusyException struct {
// contains filtered or unexported fields
}
func (*ConsolePortIsBusyException) Error ¶
func (e *ConsolePortIsBusyException) Error() string
type ConsolePortIsLockedException ¶
type ConsolePortIsLockedException struct {
// contains filtered or unexported fields
}
func (*ConsolePortIsLockedException) Error ¶
func (m *ConsolePortIsLockedException) Error() string
func (*ConsolePortIsLockedException) Is ¶
func (m *ConsolePortIsLockedException) Is(target error) bool
type Streamer ¶
type Streamer struct {
// contains filtered or unexported fields
}
func NewStreamer ¶
func NewStreamer(host, consolePort string, credentials credentials.Credentials, portCredentials credentials.Credentials, opts ...StreamerOption) *Streamer
func (*Streamer) CheckConsoleError ¶
func (*Streamer) ConsoleCmd ¶
func (*Streamer) DiscoveryAllPorts ¶
func (m *Streamer) DiscoveryAllPorts(ctx context.Context) (CommandsInfoResult, error)
func (*Streamer) FlushBuffer ¶
func (m *Streamer) FlushBuffer()
func (*Streamer) GetCredentials ¶
func (m *Streamer) GetCredentials() credentials.Credentials
func (*Streamer) InitAgentForward ¶
func (*Streamer) PrependBuffer ¶ added in v1.3.8
PrependBuffer makes already consumed data available to the next read. It is intended for protocol detectors which peek at the stream before the device implementation starts its own login sequence.
func (*Streamer) SendCharacter ¶
func (*Streamer) SetCredentialsInterceptor ¶
func (m *Streamer) SetCredentialsInterceptor(inter func(credentials.Credentials) credentials.Credentials)
func (*Streamer) SetReadTimeout ¶
func (*Streamer) UpdatePortCredentials ¶ added in v1.2.5
func (m *Streamer) UpdatePortCredentials(creds credentials.Credentials)
type StreamerOption ¶
type StreamerOption func(*Streamer)
func WithAddresses ¶ added in v1.2.2
func WithAddresses(addresses []net.IP) StreamerOption
WithAddresses makes streamer use given addresses for connection instead of host resolution
func WithForceAttache ¶
func WithForceAttache() StreamerOption
func WithHackedSSL ¶
func WithHackedSSL() StreamerOption
func WithLogger ¶
func WithLogger(log *zap.Logger) StreamerOption
func WithPort ¶
func WithPort(port int) StreamerOption
func WithSSHTunnel ¶
func WithSSHTunnel(tunnelHost string) StreamerOption
func WithSSHTunnelConn ¶
func WithSSHTunnelConn(tunnel sshtunnel.Tunnel) StreamerOption
func WithSpeed ¶
func WithSpeed(speed int) StreamerOption
func WithTrace ¶
func WithTrace(trace trace.CB) StreamerOption
Click to show internal directories.
Click to hide internal directories.