Documentation
¶
Index ¶
- type LocalPTYSession
- type Session
- type SessionEntry
- type SessionHandler
- type SessionManager
- func (sm *SessionManager) ActiveSessionCount() int
- func (sm *SessionManager) CreateSession(sessionID string) Session
- func (sm *SessionManager) RemoveSession(sessionID string)
- func (sm *SessionManager) Shutdown()
- func (sm *SessionManager) UpdateActivity(sessionID string)
- func (sm *SessionManager) WrapSession(sessionID string, session Session) *SessionHandler
- type WebTerminalServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LocalPTYSession ¶
type LocalPTYSession struct {
// contains filtered or unexported fields
}
LocalPTYSession represents a single local terminal session
func NewLocalPTYSession ¶
func NewLocalPTYSession(cfg *config.Config, v *viper.Viper) *LocalPTYSession
func (*LocalPTYSession) HandleConnection ¶
func (s *LocalPTYSession) HandleConnection(conn *websocket.Conn) error
func (*LocalPTYSession) Start ¶
func (s *LocalPTYSession) Start(cols, rows int) error
func (*LocalPTYSession) Stop ¶
func (s *LocalPTYSession) Stop() error
type Session ¶
type Session interface {
Start(cols, rows int) error
Stop() error
HandleConnection(conn *websocket.Conn) error
}
Session interface for both local PTY and future SSH sessions
type SessionEntry ¶
type SessionEntry struct {
// contains filtered or unexported fields
}
SessionEntry tracks a session and its activity
type SessionHandler ¶
type SessionHandler struct {
// contains filtered or unexported fields
}
SessionHandler wraps a session to track activity
func (*SessionHandler) HandleConnection ¶
func (sh *SessionHandler) HandleConnection(conn *websocket.Conn) error
type SessionManager ¶
type SessionManager struct {
// contains filtered or unexported fields
}
SessionManager tracks and manages all active sessions
func NewSessionManager ¶
func NewSessionManager(cfg *config.Config, v *viper.Viper) *SessionManager
func (*SessionManager) ActiveSessionCount ¶
func (sm *SessionManager) ActiveSessionCount() int
ActiveSessionCount returns the number of currently active sessions
func (*SessionManager) CreateSession ¶
func (sm *SessionManager) CreateSession(sessionID string) Session
CreateSession creates a new session and registers it
func (*SessionManager) RemoveSession ¶
func (sm *SessionManager) RemoveSession(sessionID string)
RemoveSession removes and stops a session
func (*SessionManager) Shutdown ¶
func (sm *SessionManager) Shutdown()
Shutdown stops all sessions and the cleanup goroutine
func (*SessionManager) UpdateActivity ¶
func (sm *SessionManager) UpdateActivity(sessionID string)
UpdateActivity updates the last activity time for a session
func (*SessionManager) WrapSession ¶
func (sm *SessionManager) WrapSession(sessionID string, session Session) *SessionHandler
type WebTerminalServer ¶
type WebTerminalServer struct {
// contains filtered or unexported fields
}
func NewWebTerminalServer ¶
func NewWebTerminalServer(cfg *config.Config, v *viper.Viper) *WebTerminalServer
func (*WebTerminalServer) Start ¶
func (s *WebTerminalServer) Start() error
Click to show internal directories.
Click to hide internal directories.