session

package
v0.0.0-...-d09d9b8 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2018 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ISession

type ISession interface {
	Connect() error
	Command(command string) (string, error)
	Ping() bool
	GetId() string
	GetType() SessionType
	IsClose() bool
	Close()
}

type SessionPool

type SessionPool struct {
	// contains filtered or unexported fields
}

func NewSessionPool

func NewSessionPool() *SessionPool

func (*SessionPool) Get

func (o *SessionPool) Get(sessID string) (ISession, error)

func (*SessionPool) Put

func (o *SessionPool) Put(sess ISession) error

func (*SessionPool) RemoveAndClose

func (o *SessionPool) RemoveAndClose(sessID string) error

type SessionType

type SessionType string
const (
	SessionTypeConsole SessionType = "console"
	SessionTypeTelnet  SessionType = "telnet"
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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