cmd

package
v0.0.0-...-d73eb14 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2019 License: GPL-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const DEF_CMD_PREFIX = "oncmd" // 前缀检测时不区分大小写

Variables

This section is empty.

Functions

This section is empty.

Types

type CommandLine

type CommandLine struct {
	mss.ServiceHandle

	ICommandLiner
	// contains filtered or unexported fields
}

func (*CommandLine) AnalyzeControl

func (this *CommandLine) AnalyzeControl(index int, params ...string) (mss.IControler, error)

func (*CommandLine) AnalyzeService

func (this *CommandLine) AnalyzeService(index int, params ...string) (mss.IServicer, error)

------------------------------------------------------------------------------ ==================================Internal==================================== ------------------------------------------------------------------------------

func (*CommandLine) CallCommand

func (this *CommandLine) CallCommand(command string, from mss.IServicer, done mss.CalyHandFunc) (string, error)

func (*CommandLine) CastCommand

func (this *CommandLine) CastCommand(command string)

----------------------------------------------------------------------------- ==================================External=================================== -----------------------------------------------------------------------------

func (*CommandLine) HandleGore

func (this *CommandLine) HandleGore() *mss.Gore

func (*CommandLine) HandleInit

func (this *CommandLine) HandleInit(own mss.ISeriOwner)

func (*CommandLine) HandleLaun

func (this *CommandLine) HandleLaun()

func (*CommandLine) HandleStat

func (this *CommandLine) HandleStat() string

func (*CommandLine) OnCmdEcho

func (this *CommandLine) OnCmdEcho(params ...string) (string, error)

func (*CommandLine) OnCmdExit

func (this *CommandLine) OnCmdExit(params ...string) (string, error)

----------------------------------------------------------------------------- ==================================Logical==================================== -----------------------------------------------------------------------------

func (*CommandLine) OnCmdHelp

func (this *CommandLine) OnCmdHelp(params ...string) (string, error)

func (*CommandLine) OnCmdLogLevel

func (this *CommandLine) OnCmdLogLevel(params ...string) (string, error)

func (*CommandLine) OnCmdMCList

func (this *CommandLine) OnCmdMCList(params ...string) (string, error)

func (*CommandLine) OnCmdMCStatus

func (this *CommandLine) OnCmdMCStatus(params ...string) (string, error)

func (*CommandLine) OnCmdMCSusp

func (this *CommandLine) OnCmdMCSusp(params ...string) (string, error)

func (*CommandLine) OnCmdMCWake

func (this *CommandLine) OnCmdMCWake(params ...string) (string, error)

func (*CommandLine) OnCmdMSCountEvent

func (this *CommandLine) OnCmdMSCountEvent(params ...string) (string, error)

func (*CommandLine) OnCmdMSCountEventFor

func (this *CommandLine) OnCmdMSCountEventFor(params ...string) (string, error)

func (*CommandLine) OnCmdMSEventCount

func (this *CommandLine) OnCmdMSEventCount(params ...string) (string, error)

func (*CommandLine) OnCmdMSEventCountFor

func (this *CommandLine) OnCmdMSEventCountFor(params ...string) (string, error)

func (*CommandLine) OnCmdMSEventList

func (this *CommandLine) OnCmdMSEventList(params ...string) (string, error)

func (*CommandLine) OnCmdMSList

func (this *CommandLine) OnCmdMSList(params ...string) (string, error)

func (*CommandLine) OnCmdMSStatus

func (this *CommandLine) OnCmdMSStatus(params ...string) (string, error)

func (*CommandLine) OnCmdMTContent

func (this *CommandLine) OnCmdMTContent(params ...string) (string, error)

func (*CommandLine) OnCmdMTList

func (this *CommandLine) OnCmdMTList(params ...string) (string, error)

func (*CommandLine) OnCmdMTReload

func (this *CommandLine) OnCmdMTReload(params ...string) (string, error)

func (*CommandLine) OnCmdStack

func (this *CommandLine) OnCmdStack(params ...string) (string, error)

func (*CommandLine) OnCmdStartPprof

func (this *CommandLine) OnCmdStartPprof(params ...string) (string, error)

func (*CommandLine) OnCmdStopPprof

func (this *CommandLine) OnCmdStopPprof(params ...string) (string, error)

func (*CommandLine) OnCmdTimeLived

func (this *CommandLine) OnCmdTimeLived(params ...string) (string, error)

func (*CommandLine) OnCmdTimeStart

func (this *CommandLine) OnCmdTimeStart(params ...string) (string, error)

func (*CommandLine) OnCmdVersion

func (this *CommandLine) OnCmdVersion(params ...string) (string, error)

type HandleFunc

type HandleFunc func(params ...string) (string, error)

命令处理函数类型

type ICommandEer

type ICommandEer interface {
	mss.IServicer

	CastCommand(command string)
	CallCommand(command string, from mss.IServicer, done mss.CalyHandFunc) (string, error)
}

type ICommandLiner

type ICommandLiner interface {

	// 解析参数变量
	ParseParams(params []string, outvars ...interface{}) error

	// 获得命令名称[通过子串查找]
	CommandFind(subStr string) string

	// 获得帮助信息
	CommandTips() string

	// 获得注册的命令数量
	CommandCount() int

	// 注册消息的回调方法
	RegistHandle(handler HandleFunc, tips string)
}

CommandLine Public interface

Jump to

Keyboard shortcuts

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