Documentation ¶
Index ¶
- Constants
- Variables
- type ISessionData
- type Pty
- type RandomSessionData
- type RemoteConsoleInfo
- func (info *RemoteConsoleInfo) Cleanup() error
- func (info *RemoteConsoleInfo) Connect() error
- func (info *RemoteConsoleInfo) GetClientSession() *mcclient.ClientSession
- func (info *RemoteConsoleInfo) GetCommand() *exec.Cmd
- func (info *RemoteConsoleInfo) GetConnectParams() (string, error)
- func (info *RemoteConsoleInfo) GetId() string
- func (info *RemoteConsoleInfo) GetPassword() string
- func (info *RemoteConsoleInfo) GetProtocol() string
- func (info *RemoteConsoleInfo) GetRecordObject() *recorder.Object
- func (info *RemoteConsoleInfo) IsNeedShowInfo() bool
- func (info *RemoteConsoleInfo) Reconnect()
- func (info *RemoteConsoleInfo) Scan(byte, func(string))
- func (info *RemoteConsoleInfo) ShowInfo() string
- type SSession
- type SSessionManager
Constants ¶
Variables ¶
View Source
var ( Manager *SSessionManager AES_KEY string AccessInterval time.Duration = 5 * time.Minute )
Functions ¶
This section is empty.
Types ¶
type ISessionData ¶
type Pty ¶
type Pty struct { Session *SSession Cmd *exec.Cmd Pty *os.File OriginSize *pty.Winsize Exit bool // contains filtered or unexported fields }
func (*Pty) IsInShellMode ¶
type RandomSessionData ¶
func WrapCommandSession ¶
func WrapCommandSession(cmd command.ICommand) *RandomSessionData
func (*RandomSessionData) GetId ¶
func (s *RandomSessionData) GetId() string
type RemoteConsoleInfo ¶
type RemoteConsoleInfo struct { cloudprovider.ServerVncOutput // contains filtered or unexported fields }
func NewRemoteConsoleInfoByCloud ¶
func NewRemoteConsoleInfoByCloud(s *mcclient.ClientSession, serverId string, query jsonutils.JSONObject) (*RemoteConsoleInfo, error)
func (*RemoteConsoleInfo) Cleanup ¶
func (info *RemoteConsoleInfo) Cleanup() error
Cleanup implements ISessionData interface
func (*RemoteConsoleInfo) Connect ¶
func (info *RemoteConsoleInfo) Connect() error
Connect implements ISessionData interface
func (*RemoteConsoleInfo) GetClientSession ¶
func (info *RemoteConsoleInfo) GetClientSession() *mcclient.ClientSession
func (*RemoteConsoleInfo) GetCommand ¶
func (info *RemoteConsoleInfo) GetCommand() *exec.Cmd
GetCommand implements ISessionData interface
func (*RemoteConsoleInfo) GetConnectParams ¶
func (info *RemoteConsoleInfo) GetConnectParams() (string, error)
func (*RemoteConsoleInfo) GetId ¶
func (info *RemoteConsoleInfo) GetId() string
func (*RemoteConsoleInfo) GetPassword ¶
func (info *RemoteConsoleInfo) GetPassword() string
func (*RemoteConsoleInfo) GetProtocol ¶
func (info *RemoteConsoleInfo) GetProtocol() string
GetProtocol implements ISessionData interface
func (*RemoteConsoleInfo) GetRecordObject ¶
func (info *RemoteConsoleInfo) GetRecordObject() *recorder.Object
func (*RemoteConsoleInfo) IsNeedShowInfo ¶
func (info *RemoteConsoleInfo) IsNeedShowInfo() bool
IsNeedShowInfo implements ISessionData interface
func (*RemoteConsoleInfo) Reconnect ¶
func (info *RemoteConsoleInfo) Reconnect()
Reconnect implements ISessionData interface
func (*RemoteConsoleInfo) Scan ¶
func (info *RemoteConsoleInfo) Scan(byte, func(string))
Scan implements ISessionData interface
func (*RemoteConsoleInfo) ShowInfo ¶
func (info *RemoteConsoleInfo) ShowInfo() string
ShowInfo implements ISessionData interface
type SSession ¶
type SSession struct { ISessionData Id string AccessToken string AccessedAt time.Time // contains filtered or unexported fields }
func (SSession) GetConnectParams ¶
func (*SSession) GetRecorder ¶
func (*SSession) RegisterDuplicateHook ¶
func (s *SSession) RegisterDuplicateHook(f func())
type SSessionManager ¶
func NewSessionManager ¶
func NewSessionManager() *SSessionManager
func (*SSessionManager) Save ¶
func (man *SSessionManager) Save(data ISessionData) (*SSession, error)
Click to show internal directories.
Click to hide internal directories.