sessionmgr

package
v0.0.0-...-2f80c7b Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2022 License: BSD-2-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PtyInput

type PtyInput struct {
	Type string
	Data struct {
		SessionID string `json:"SessionId"`
		Input     string
	}
}

type PtyOutput

type PtyOutput struct {
	Type string
	Data struct {
		SessionID string `json:"SessionId"`
		Output    string
	}
}

type PtyReady

type PtyReady struct {
	Type string
	Data struct {
		SessionID string `json:"SessionId"`
	}
}

type PtyStart

type PtyStart struct {
	Type string
	Data struct {
		SessionID string `json:"SessionId"`
		Cols      int
		Rows      int
	}
}

type SessionAuth

type SessionAuth struct {
	Type string
	Data struct {
		AppID      int `json:"AppId"`
		Uin        string
		SessionID  string `json:"SessionId"`
		InstanceID string `json:"InstanceId"`
	}
}

type SessionManager

type SessionManager struct {
	ApiHost    string
	ApiPort    int
	WsHost     string
	WsPort     int
	Region     string
	AppID      int
	Uin        string
	InstanceID string
	SessionID  string
	// contains filtered or unexported fields
}

func NewSessionManager

func NewSessionManager(region, apiHost, wsHost string, apiPort, wsPort, appID int, uin, instanceId string) *SessionManager

func (*SessionManager) PtyInput

func (sm *SessionManager) PtyInput(input string, timeout time.Duration) error

func (*SessionManager) PtyStart

func (sm *SessionManager) PtyStart(timeout time.Duration) error

func (*SessionManager) SessionAuth

func (sm *SessionManager) SessionAuth() error

func (*SessionManager) StartSession

func (sm *SessionManager) StartSession() error

func (*SessionManager) TestConn

func (sm *SessionManager) TestConn() error

func (*SessionManager) WaitPtyReady

func (sm *SessionManager) WaitPtyReady(timeout time.Duration) error

Jump to

Keyboard shortcuts

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