Documentation
¶
Index ¶
- func Auth(gateway *GatewayConfig) (ssh.AuthMethod, error)
- func ConnectToNextJumpHost(ctx context.Context, currentClient *ssh.Client, user string, host string, ...) (*ssh.Client, error)
- func GetIntField(data map[string]interface{}, key string, defaultValue int) int
- func GetStringField(data map[string]interface{}, key string, defaultValue string) string
- type GatewayConfig
- type MultiGatewayManager
- type SSHConnect
- type TerminalMessage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Auth ¶
func Auth(gateway *GatewayConfig) (ssh.AuthMethod, error)
func ConnectToNextJumpHost ¶
func GetIntField ¶
GetIntField 获取字段值,若不存在则返回默认值,返回值为 int
Types ¶
type GatewayConfig ¶
type MultiGatewayManager ¶
type MultiGatewayManager struct {
Gateways []*GatewayConfig
}
func NewMultiGatewayManager ¶
func NewMultiGatewayManager(config []*GatewayConfig) *MultiGatewayManager
type SSHConnect ¶
type SSHConnect struct {
StdinPipe io.WriteCloser
// contains filtered or unexported fields
}
func NewSSHConnect ¶
func (*SSHConnect) SendMessageToWebSocket ¶
func (s *SSHConnect) SendMessageToWebSocket(msg string) error
func (*SSHConnect) Start ¶
func (s *SSHConnect) Start()
func (*SSHConnect) Stop ¶
func (s *SSHConnect) Stop()
func (*SSHConnect) WindowChange ¶
func (s *SSHConnect) WindowChange(h int, w int) error
type TerminalMessage ¶
type TerminalMessage struct {
Operation string `json:"operation"`
Data string `json:"data"`
Cols int `json:"cols"`
Rows int `json:"rows"`
}
func NewMessage ¶
func NewMessage(operation string, data string, cols, rows int) TerminalMessage
func ParseTerminalMessage ¶
func ParseTerminalMessage(value []byte) (TerminalMessage, error)
Click to show internal directories.
Click to hide internal directories.