launcher

package
v0.3.13 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TerminalTerm  = "xterm"
	SSHKeyKeyword = "SSH-KEY"
)

Variables

This section is empty.

Functions

func GetConfigFromSshConnector

func GetConfigFromSshConnector(tgt *SshConnector) *config.ServerListConfig

GetConfigFromSshConnector Get ServerListConfig by SshConnector

Types

type Connector

type Connector interface {
	Launch() bool
	CreateConnection() (sshClient *ssh.Client, err error)
	CloseConnection(sshClient *ssh.Client)
	TryToConnect() (err error)
}

type SshConnector

type SshConnector struct {
	Ip           string
	Port         string
	User         string
	Password     string
	SshTimeout   time.Duration
	HostKeyMutex *sync.Mutex
}

func GetSshConnectorFromConfig

func GetSshConnectorFromConfig(conf *config.ServerListConfig) *SshConnector

GetSshConnectorFromConfig Get SshConnector by ServerListConfig

func (*SshConnector) CloseConnection

func (sc *SshConnector) CloseConnection(sshClient *ssh.Client)

func (*SshConnector) CreateConnection

func (sc *SshConnector) CreateConnection() (sshClient *ssh.Client, err error)

func (*SshConnector) Launch

func (sc *SshConnector) Launch() bool

func (*SshConnector) LoadConfig

func (sc *SshConnector) LoadConfig() (config *ssh.ClientConfig)

func (*SshConnector) TryToConnect

func (sc *SshConnector) TryToConnect() (err error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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