cmdmgr

package
v0.0.0-...-a65be8c Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2017 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertToString

func ConvertToString(src string, srcCode string, tagCode string) string

ConvertToString 编码转换

eg. ConvertToString(line, "gbk", "utf-8")

Types

type CheckSessionExist

type CheckSessionExist func(session string) bool

CheckSessionExist ...

type CmdSession

type CmdSession struct {
	Running     bool
	SessionID   string
	Cmd         *exec.Cmd
	Outcmd      chan string
	Incmd       chan string
	Stopped     bool
	StartTime   time.Time
	LastCmdTime time.Time
	EndTime     time.Time
	// contains filtered or unexported fields
}

CmdSession ...

func (*CmdSession) End

func (cs *CmdSession) End(force bool)

End ...

func (*CmdSession) Start

func (cs *CmdSession) Start() bool

Start ...

type CmdSessionManager

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

CmdSessionManager ...

func NewCmdManager

func NewCmdManager() *CmdSessionManager

NewCmdManager ...

func (*CmdSessionManager) CheckSessions

func (cm *CmdSessionManager) CheckSessions(funcCheck CheckSessionExist)

CheckSessions ...

func (*CmdSessionManager) DeleteCmdSession

func (cm *CmdSessionManager) DeleteCmdSession(sessionID string)

DeleteCmdSession ...

func (*CmdSessionManager) GetCmdSession

func (cm *CmdSessionManager) GetCmdSession(sessionID string) *CmdSession

GetCmdSession ...

Jump to

Keyboard shortcuts

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