Documentation
¶
Index ¶
- Constants
- Variables
- type CreateSessionOptions
- type Manager
- func (m *Manager) BeginStream(sessionID, username string, allowAll bool) (*Session, error)
- func (m *Manager) CreateSession(opts CreateSessionOptions) (*models.TerminalSessionInfo, error)
- func (m *Manager) GetSessionInfo(sessionID, username string, allowAll bool) (*models.TerminalSessionInfo, error)
- func (m *Manager) Shutdown()
- func (m *Manager) TerminateSession(sessionID, username string, allowAll bool) error
- type Session
- func (s *Session) EndStream()
- func (s *Session) Read(p []byte) (int, error)
- func (s *Session) Resize(cols, rows int) error
- func (s *Session) Snapshot() models.TerminalSessionInfo
- func (s *Session) Terminate(reason string)
- func (s *Session) WaitForExit(timeout time.Duration) error
- func (s *Session) WriteInput(input string) error
Constants ¶
Variables ¶
View Source
var ( ErrSessionNotFound = errors.New("terminal session not found") ErrSessionForbidden = errors.New("terminal session not owned by user") ErrSessionAttached = errors.New("terminal session already has an active client") ErrTooManySessions = errors.New("too many terminal sessions for user") ErrSessionExited = errors.New("terminal session has already exited") )
Functions ¶
This section is empty.
Types ¶
type CreateSessionOptions ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func NewManager ¶
func (*Manager) BeginStream ¶
func (*Manager) CreateSession ¶
func (m *Manager) CreateSession(opts CreateSessionOptions) (*models.TerminalSessionInfo, error)
func (*Manager) GetSessionInfo ¶
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
func (*Session) Snapshot ¶
func (s *Session) Snapshot() models.TerminalSessionInfo
func (*Session) WriteInput ¶
Click to show internal directories.
Click to hide internal directories.