interactivecommands

package
v0.0.0-...-90fbc02 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2022 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package interactivecommands implements session shell plugin with interactive commands.

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 Interactive Commands Plugin

Types

type InteractiveCommandsPlugin

type InteractiveCommandsPlugin struct {
	// contains filtered or unexported fields
}

InteractiveCommandsPlugin is the type for the plugin.

func (*InteractiveCommandsPlugin) Execute

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

Jump to

Keyboard shortcuts

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