Documentation
¶
Index ¶
- func Commands(con *repl.Console) []*cobra.Command
- func Register(con *repl.Console)
- func ShellCmd(cmd *cobra.Command, con *repl.Console) error
- type PTYClient
- func (c *PTYClient) ResizeShell(ctx context.Context, sessionID string, cols, rows int) error
- func (c *PTYClient) SendInput(ctx context.Context, sessionID, input string) error
- func (c *PTYClient) SetDisconnectCallback(callback func(string))
- func (c *PTYClient) SetErrorCallback(callback func(string, string))
- func (c *PTYClient) SetOutputCallback(callback func(string, string))
- func (c *PTYClient) SetPromptCallback(callback func(string, string))
- func (c *PTYClient) StartShell(ctx context.Context, sessionID, shellType string, cols, rows int) error
- func (c *PTYClient) StopShell(ctx context.Context, sessionID string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type PTYClient ¶
type PTYClient struct {
// contains filtered or unexported fields
}
PTYClient 用于与服务器通信
func NewPTYClient ¶
func NewPTYClient(rpc clientrpc.MaliceRPCClient, sess *core.Session) *PTYClient
NewPTYClient 创建一个新的 PTY 客户端
func (*PTYClient) ResizeShell ¶
ResizeShell 调整shell大小
func (*PTYClient) SetDisconnectCallback ¶
SetDisconnectCallback 设置断开连接回调
func (*PTYClient) SetErrorCallback ¶
SetErrorCallback 设置错误回调
func (*PTYClient) SetOutputCallback ¶
SetOutputCallback 设置输出回调
func (*PTYClient) SetPromptCallback ¶
SetPromptCallback 设置prompt回调
Click to show internal directories.
Click to hide internal directories.