Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientSetting ¶
type ClientSetting struct {
Height, Width int
}
type ClientSettingFunc ¶
type ClientSettingFunc func(*ClientSetting)
type Connection ¶
type Connection interface { SSHClient(reader io.ReadWriter, opts ...ClientSettingFunc) error Exec(cmd string, host *HostCfg) (stdout string, err error) Scp(src, dst string) error }
func NewConnection ¶
func NewConnection(cfg Cfg) (Connection, error)
type HostCfg ¶
type HostCfg struct { Name string `yaml:"name,omitempty" json:"name,omitempty"` Address string `yaml:"address,omitempty" json:"address,omitempty"` InternalAddress string `yaml:"internalAddress,omitempty" json:"internalAddress,omitempty"` Port string `yaml:"port,omitempty" json:"port,omitempty"` User string `yaml:"user,omitempty" json:"user,omitempty"` Password string `yaml:"password,omitempty" json:"password,omitempty"` PrivateKeyPath string `yaml:"privateKeyPath,omitempty" json:"privateKeyPath,omitempty"` Arch string `yaml:"arch,omitempty" json:"arch,omitempty"` }
type ResizeEvent ¶
type ResizeEvent interface { io.ReadWriter ResizeEvent(session *ssh.Session) }
type TTYHandler ¶
type TTYHandler struct { CloseCh chan struct{} // contains filtered or unexported fields }
func NewTTYHandler ¶
func NewTTYHandler(rw TTYReadWriter) *TTYHandler
func (TTYHandler) Close ¶
func (t TTYHandler) Close()
func (TTYHandler) ResizeEvent ¶
func (t TTYHandler) ResizeEvent(session *ssh.Session)
Click to show internal directories.
Click to hide internal directories.