remote

package
v0.0.0-...-42b7c82 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetFileInRemotePath

func GetFileInRemotePath(scid string, conf config.SSHConfig, remotePath string, localPath string) error

TODO

func GetFilesInRemoteDir

func GetFilesInRemoteDir(scid string, conf config.SSHConfig, remoteDir string, localDir string) error

func GetFtpClient

func GetFtpClient(client *ssh.Client) (*sftp.Client, error)

func GetNebulaComponentStatus

func GetNebulaComponentStatus(ipAddress string, port int) ([]string, error)

func GetNebulaConfigs

func GetNebulaConfigs(ipAddress string, port int) ([]string, error)

func GetNebulaMetrics

func GetNebulaMetrics(ipAddress string, port int) ([]string, error)

Types

type ExecuteResult

type ExecuteResult struct {
	CMD     string
	Err     error
	StdOut  []byte
	StdErr  []byte
	Latency time.Duration
}

type SSHClient

type SSHClient struct {
	*ssh.Client
}

func GetSSHClient

func GetSSHClient(scid string, conf config.SSHConfig) (*SSHClient, error)

func (*SSHClient) Execute

func (c *SSHClient) Execute(cmd string) (ExecuteResult, bool)

func (*SSHClient) ExecuteAsync

func (c *SSHClient) ExecuteAsync(cmd string, ch chan<- ExecuteResult)

Jump to

Keyboard shortcuts

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