shellsession

package
v0.0.0-...-ab18fed Latest Latest
Warning

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

Go to latest
Published: May 21, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package shellsession starts shell session.

Package shellsession starts shell session.

Index

Constants

View Source
const (
	ResizeSleepInterval = time.Millisecond * 500
	StdinBufferLimit    = 1024
)

Variables

View Source
var GetTerminalSizeCall = func(fd int) (width int, height int, err error) {
	return terminal.GetSize(fd)
}

Functions

This section is empty.

Types

type ShellSession

type ShellSession struct {
	session.Session

	// SizeData is used to store size data at session level to compare with new size.
	SizeData message.SizeData
	// contains filtered or unexported fields
}

func (*ShellSession) Initialize

func (s *ShellSession) Initialize(log log.T, sessionVar *session.Session)

func (ShellSession) Name

func (ShellSession) Name() string

Name is the session name used in the plugin

func (ShellSession) ProcessStreamMessagePayload

func (s ShellSession) ProcessStreamMessagePayload(log log.T, outputMessage message.ClientMessage) (isHandlerReady bool, err error)

ProcessStreamMessagePayload prints payload received on datachannel to console

func (*ShellSession) SetSessionHandlers

func (s *ShellSession) SetSessionHandlers(log log.T) (err error)

StartSession takes input and write it to data channel

func (*ShellSession) Stop

func (s *ShellSession) Stop()

stop restores the terminal settings and exits

Jump to

Keyboard shortcuts

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