Documentation
¶
Overview ¶
Package interactivecommands implements session shell plugin with interactive commands.
Package interactivecommands implements session shell plugin with interactive commands.
Index ¶
- func NewPlugin(context context.T) (sessionplugin.ISessionPlugin, error)
- type InteractiveCommandsPlugin
- func (p *InteractiveCommandsPlugin) Execute(config agentContracts.Configuration, cancelFlag task.CancelFlag, ...)
- func (p *InteractiveCommandsPlugin) GetPluginParameters(parameters interface{}) interface{}
- func (p *InteractiveCommandsPlugin) InputStreamMessageHandler(log log.T, streamDataMessage mgsContracts.AgentMessage) error
- func (p *InteractiveCommandsPlugin) RequireHandshake() bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewPlugin ¶
func NewPlugin(context context.T) (sessionplugin.ISessionPlugin, error)
NewPlugin returns a new instance of the Interactive Commands Plugin
Types ¶
type InteractiveCommandsPlugin ¶
type InteractiveCommandsPlugin struct {
// contains filtered or unexported fields
}
InteractiveCommandsPlugin is the type for the plugin.
func (*InteractiveCommandsPlugin) Execute ¶
func (p *InteractiveCommandsPlugin) Execute( config agentContracts.Configuration, cancelFlag task.CancelFlag, output iohandler.IOHandler, dataChannel datachannel.IDataChannel)
Execute starts pseudo terminal. It reads incoming message from data channel and writes to pty.stdin. It reads message from pty.stdout and writes to data channel
func (*InteractiveCommandsPlugin) GetPluginParameters ¶
func (p *InteractiveCommandsPlugin) GetPluginParameters(parameters interface{}) interface{}
Returns parameters required for CLI/console to start session
func (*InteractiveCommandsPlugin) InputStreamMessageHandler ¶
func (p *InteractiveCommandsPlugin) InputStreamMessageHandler(log log.T, streamDataMessage mgsContracts.AgentMessage) error
InputStreamMessageHandler passes payload byte stream to shell stdin
func (*InteractiveCommandsPlugin) RequireHandshake ¶
func (p *InteractiveCommandsPlugin) RequireHandshake() bool
InteractiveCommands plugin doesn't require handshake to establish session