interactivecommands

package
v0.0.0-...-176c957 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 29, 2024 License: Apache-2.0 Imports: 10 Imported by: 1

Documentation

Overview

Package interactivecommands implements session shell plugin with interactive commands.

Index

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

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL