terminal

package
v0.2.78 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetTerminalSize

func GetTerminalSize() (int, int, error)

GetTerminalSize returns the current terminal size

Types

type Manager

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

Manager handles terminal sessions

func NewManager

func NewManager() *Manager

NewManager creates a new terminal manager

func (*Manager) CloseAllSessions

func (m *Manager) CloseAllSessions()

CloseAllSessions closes all active sessions

func (*Manager) CloseSession

func (m *Manager) CloseSession(sessionID string) error

CloseSession closes a session

func (*Manager) ExecCommand

func (m *Manager) ExecCommand(execID string, websocketURL string, command []string) error

ExecCommand executes a single command (non-interactive)

func (*Manager) GetSession

func (m *Manager) GetSession(sessionID string) (*Session, bool)

GetSession returns a session by ID

func (*Manager) StartExecSession

func (m *Manager) StartExecSession(execID string, websocketURL string, interactive bool) (*Session, error)

StartExecSession starts a new exec session

func (*Manager) StartShellSession

func (m *Manager) StartShellSession(sessionID string, websocketURL string) (*Session, error)

StartShellSession starts a new shell session

type Session

type Session struct {
	ID           string
	WebSocketURL string
	// contains filtered or unexported fields
}

Session represents a terminal session

func (*Session) Close

func (s *Session) Close()

Close closes the session

func (*Session) SendCommand

func (s *Session) SendCommand(command string) error

SendCommand sends a command to the session

func (*Session) WaitForCompletion

func (s *Session) WaitForCompletion()

WaitForCompletion waits for the session to complete

Jump to

Keyboard shortcuts

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