sshc

package
v0.3.37 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2023 License: MIT Imports: 20 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ShellSession

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

func (*ShellSession) Run

func (this *ShellSession) Run(cmd string, isExpect bool) *promise.Promise[interface{}]

func (*ShellSession) SetCmd

func (this *ShellSession) SetCmd(cmd *shell.ShellCommand)

func (*ShellSession) SetWriter

func (this *ShellSession) SetWriter(writer io.Writer)

func (*ShellSession) Start

func (this *ShellSession) Start() error

type SshClient

type SshClient struct {
	*log.ComposeLogger
	events.EventEmmiter

	User string
	// contains filtered or unexported fields
}

func NewSshClient

func NewSshClient(user, password, addr string, console bool) *SshClient

func (*SshClient) Clear added in v0.1.24

func (this *SshClient) Clear()

func (*SshClient) ClearSftpClients

func (this *SshClient) ClearSftpClients()

func (*SshClient) Connect

func (this *SshClient) Connect() *promise.Promise[interface{}]

func (*SshClient) Disconnect

func (this *SshClient) Disconnect() *promise.Promise[interface{}]

func (*SshClient) GetConnStr

func (this *SshClient) GetConnStr() string

func (*SshClient) Gzip

func (this *SshClient) Gzip(files []*os.File, dest string) error

func (*SshClient) IsConnect

func (this *SshClient) IsConnect() bool

func (*SshClient) NewShellSession

func (this *SshClient) NewShellSession() *ShellSession

func (*SshClient) Remove

func (this *SshClient) Remove(remotePath string) error

func (*SshClient) RemoveSub

func (this *SshClient) RemoveSub(remotePath string) error

func (*SshClient) RunCmd

func (this *SshClient) RunCmd(cmd string) *promise.Promise[interface{}]

func (*SshClient) RunCmdPwd

func (this *SshClient) RunCmdPwd() *promise.Promise[interface{}]

func (*SshClient) RunShellCmd

func (this *SshClient) RunShellCmd(cmd string, expect bool) *promise.Promise[interface{}]

func (*SshClient) RunShellCmdPwd

func (this *SshClient) RunShellCmdPwd() *promise.Promise[interface{}]

func (*SshClient) SetAddr

func (this *SshClient) SetAddr(user, password, addr string)

func (*SshClient) SetStringWriter

func (this *SshClient) SetStringWriter(writer StringWriter)

func (*SshClient) UnGzip

func (this *SshClient) UnGzip(file, dest string) error

func (*SshClient) UnZip

func (this *SshClient) UnZip(file, dest string) error

func (*SshClient) Upload

func (this *SshClient) Upload(localPath string, remotePath string) error

func (*SshClient) UploadSub

func (this *SshClient) UploadSub(localPath string, remotePath string) error

func (*SshClient) Write

func (this *SshClient) Write(p []byte) (int, error)

func (*SshClient) Zip

func (this *SshClient) Zip(files []*os.File, dest string) error

type StringWriter

type StringWriter interface {
	WriteString(string)
}

Jump to

Keyboard shortcuts

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