Documentation ¶
Overview ¶
Package noninteractivecommands implements session shell sessionPlugin with non-interactive command execution.
Index ¶
- func NewPlugin(context context.T) (sessionplugin.ISessionPlugin, error)
- type NonInteractiveCommandsPlugin
- func (p *NonInteractiveCommandsPlugin) Execute(config agentContracts.Configuration, cancelFlag task.CancelFlag, ...)
- func (p *NonInteractiveCommandsPlugin) GetPluginParameters(parameters interface{}) interface{}
- func (p *NonInteractiveCommandsPlugin) InputStreamMessageHandler(log log.T, streamDataMessage mgsContracts.AgentMessage) error
- func (p *NonInteractiveCommandsPlugin) 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 NonInteractiveCommandsPlugin ¶
type NonInteractiveCommandsPlugin struct {
// contains filtered or unexported fields
}
NonInteractiveCommandsPlugin is the type for the sessionPlugin.
func (*NonInteractiveCommandsPlugin) Execute ¶
func (p *NonInteractiveCommandsPlugin) Execute(config agentContracts.Configuration, cancelFlag task.CancelFlag, output iohandler.IOHandler, dataChannel datachannel.IDataChannel)
Execute executes command as passed in from document parameter via cmd.Exec. It reads message from cmd.stdout and writes to data channel.
func (*NonInteractiveCommandsPlugin) GetPluginParameters ¶
func (p *NonInteractiveCommandsPlugin) GetPluginParameters(parameters interface{}) interface{}
Returns parameters required for CLI/console to start session
func (*NonInteractiveCommandsPlugin) InputStreamMessageHandler ¶
func (p *NonInteractiveCommandsPlugin) InputStreamMessageHandler(log log.T, streamDataMessage mgsContracts.AgentMessage) error
InputStreamMessageHandler passes payload byte stream to command execution process
func (*NonInteractiveCommandsPlugin) RequireHandshake ¶
func (p *NonInteractiveCommandsPlugin) RequireHandshake() bool
Override as NonInteractiveCommandsPlugin plugin requires handshake to establish session
Click to show internal directories.
Click to hide internal directories.