standardstream

package
v0.0.0-...-0117b6e Latest Latest
Warning

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

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

Documentation

Overview

Package standardstream implements session standard stream plugin.

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 Standard Stream Plugin

Types

type StandardStreamPlugin

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

StandardStreamPlugin is the type for the plugin.

func (*StandardStreamPlugin) Execute

func (p *StandardStreamPlugin) 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 (*StandardStreamPlugin) GetPluginParameters

func (p *StandardStreamPlugin) GetPluginParameters(parameters interface{}) interface{}

Returns parameters required for CLI/console to start session

func (*StandardStreamPlugin) InputStreamMessageHandler

func (p *StandardStreamPlugin) InputStreamMessageHandler(log log.T, streamDataMessage mgsContracts.AgentMessage) error

InputStreamMessageHandler passes payload byte stream to shell stdin

func (*StandardStreamPlugin) RequireHandshake

func (p *StandardStreamPlugin) RequireHandshake() bool

StandardStream 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