ssh

package
v0.12.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 16, 2023 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SshClient

type SshClient struct {
	// contains filtered or unexported fields
}

func NewSshClient

func NewSshClient(config *SshClientConfig) (*SshClient, error)

func (*SshClient) Close

func (client *SshClient) Close() error

func (*SshClient) Exec

func (client *SshClient) Exec(opts *SshExecOpts) error

func (*SshClient) SendRequest

func (client *SshClient) SendRequest(protocol string, payload string) (string, error)

func (*SshClient) Tunnel

func (client *SshClient) Tunnel(opts *SshTunnelOpts)

type SshClientConfig

type SshClientConfig struct {
	Address  string
	Username string
	Token    string
}

type SshExecOpts

type SshExecOpts struct {
	Payload               string
	OnStreamStartCallback func()
	OnStreamErrorCallback func(error)
}

type SshTunnelOpts

type SshTunnelOpts struct {
	LocalPort             string
	RemoteHost            string
	RemotePort            string
	OnTunnelStartCallback func(string)
	OnTunnelStopCallback  func(string)
	OnTunnelErrorCallback func(error)
}

func (*SshTunnelOpts) LocalAddress

func (t *SshTunnelOpts) LocalAddress() string

func (*SshTunnelOpts) Network

func (t *SshTunnelOpts) Network() string

func (*SshTunnelOpts) RemoteAddress

func (t *SshTunnelOpts) RemoteAddress() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL