Documentation ¶
Index ¶
- Constants
- Variables
- type ISessionData
- type Pty
- type RemoteConsoleInfo
- func (info *RemoteConsoleInfo) Cleanup() error
- func (info *RemoteConsoleInfo) GetCommand() *exec.Cmd
- func (info *RemoteConsoleInfo) GetConnectParams() (string, error)
- func (info *RemoteConsoleInfo) GetData(s string) (bool, string, string)
- func (info *RemoteConsoleInfo) GetProtocol() string
- func (info *RemoteConsoleInfo) ShowInfo() string
- type SSession
- type SSessionManager
Constants ¶
View Source
const ( VNC = "vnc" ALIYUN = "aliyun" SPICE = "spice" WMKS = "wmks" )
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 RemoteConsoleInfo ¶
type RemoteConsoleInfo struct { Host string `json:"host"` Port int64 `json:"port"` Protocol string `json:"protocol"` Id string `json:"id"` OsName string `json:"osName"` // used by aliyun server InstanceId string `json:"instance_id"` Url string `json:"url"` Password string `json:"password"` }
func NewRemoteConsoleInfoByCloud ¶
func NewRemoteConsoleInfoByCloud(s *mcclient.ClientSession, serverId string) (*RemoteConsoleInfo, error)
func (*RemoteConsoleInfo) Cleanup ¶
func (info *RemoteConsoleInfo) Cleanup() error
Cleanup implements ISessionData interface
func (*RemoteConsoleInfo) GetCommand ¶
func (info *RemoteConsoleInfo) GetCommand() *exec.Cmd
GetCommand implements ISessionData interface
func (*RemoteConsoleInfo) GetConnectParams ¶
func (info *RemoteConsoleInfo) GetConnectParams() (string, error)
func (*RemoteConsoleInfo) GetData ¶
func (info *RemoteConsoleInfo) GetData(s string) (bool, string, string)
GetData implements ISessionData interface
func (*RemoteConsoleInfo) GetProtocol ¶
func (info *RemoteConsoleInfo) GetProtocol() string
GetProtocol 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 }
func (SSession) GetConnectParams ¶
type SSessionManager ¶
func NewSessionManager ¶
func NewSessionManager() *SSessionManager
func (*SSessionManager) Save ¶
func (man *SSessionManager) Save(data ISessionData) (session *SSession, err error)
Click to show internal directories.
Click to hide internal directories.