Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GTSSHClientRun ¶
func GTSSHClientRun(cliInfo *CLIConnectInfo, cmds []string, endFunc func(result *SSHResultInfo, err error))
对一个地址多个命令并发执行并返回
func GTSSHClientRunDualAddress ¶
func GTSSHClientRunDualAddress(cliInfos []*CLIConnectInfo, cmds []string, endFunc func(results []*SSHResultInfo, err error))
对一个地址多个命令并发执行并返回 使用
Types ¶
type CLIConnectInfo ¶
type SSHController ¶ added in v1.4.4
type SSHController struct { Address string Port int64 User string Pwd string Client *ssh.Client Session *ssh.Session LastResult string ConnectLock *sync.RWMutex RunCmdLock *sync.RWMutex }
连接信息
func (*SSHController) Connect ¶ added in v1.4.4
func (c *SSHController) Connect() (*SSHController, error)
连接对象
type SSHResultData ¶ added in v1.4.4
type SSHResultInfo ¶ added in v1.4.4
type SSHResultInfo struct { Address string `json:"address"` Port int64 `json:"port"` ResultData []*SSHResultData `json:"result_data"` }
Click to show internal directories.
Click to hide internal directories.