client

package
v0.0.0-...-6421dc5 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2022 License: LGPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrSSHConnection = errors.New("maximum retries has been reached for SSH connection")

Functions

This section is empty.

Types

type SSHClient

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

func NewSSHClient

func NewSSHClient(conf util.Config) *SSHClient

func (*SSHClient) Dial

func (c *SSHClient) Dial()

func (*SSHClient) Download

func (c *SSHClient) Download(srcPath string, dstPath string, retry int, interval int) error

func (*SSHClient) NewSession

func (c *SSHClient) NewSession(retry int, interval int) (*ssh.Session, error)

func (*SSHClient) NewSftpClient

func (c *SSHClient) NewSftpClient(retry int, interval int) (*sftp.Client, error)

func (*SSHClient) RunCmd

func (c *SSHClient) RunCmd(cmd string, retry int, interval int) (string, string, error)

func (*SSHClient) TryNewSession

func (c *SSHClient) TryNewSession() *ssh.Session

func (*SSHClient) TryNewSftpClient

func (c *SSHClient) TryNewSftpClient() *sftp.Client

func (*SSHClient) Upload

func (c *SSHClient) Upload(srcPath string, dstPath string, retry int, interval int) error

Jump to

Keyboard shortcuts

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