Documentation
¶
Overview ¶
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 InteractiveCommands Plugin
Types ¶
type InteractiveCommandsPlugin ¶
type InteractiveCommandsPlugin struct {
// contains filtered or unexported fields
}
InteractiveCommandsPlugin is the type for the sessionPlugin.
func (*InteractiveCommandsPlugin) Execute ¶
func (p *InteractiveCommandsPlugin) Execute(config agentContracts.Configuration, cancelFlag task.CancelFlag, output iohandler.IOHandler, dataChannel datachannel.IDataChannel)
Execute executes command as passed in from document parameter via pty.stdin. It reads message from cmd.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
Click to show internal directories.
Click to hide internal directories.