session

package
v2.1.23+incompatible Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2018 License: Apache-2.0 Imports: 14 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Manager *SSessionManager
	AES_KEY string
)

Functions

This section is empty.

Types

type Pty

type Pty struct {
	Session *SSession
	Cmd     *exec.Cmd
	Pty     *os.File

	Show    bool
	IsOk    bool
	Buffer  string
	Output  string
	Command string
	Exit    bool
	// contains filtered or unexported fields
}

func NewPty

func NewPty(session *SSession) (p *Pty, err error)

func (*Pty) Resize

func (p *Pty) Resize(size *pty.Winsize)

func (*Pty) Stop

func (p *Pty) Stop()

type SSession

type SSession struct {
	command.ICommand
	Id          string
	AccessToken string
}

func (*SSession) Close

func (s *SSession) Close() error

func (SSession) GetConnectParams

func (s SSession) GetConnectParams() (string, error)

type SSessionManager

type SSessionManager struct {
	*sync.Map
}

func NewSessionManager

func NewSessionManager() *SSessionManager

func (*SSessionManager) Get

func (man *SSessionManager) Get(accessToken string) (*SSession, bool)

func (*SSessionManager) Save

func (man *SSessionManager) Save(Command command.ICommand) (session *SSession, err error)

Jump to

Keyboard shortcuts

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