Documentation ¶
Index ¶
- Variables
- func GetProcessState() map[string]ZbProcess
- func GuardServer(serversState ServersState)
- func GuardServers()
- func MarngeServers(f func(MStartProcess))
- func StartServer4Marnge(serverName string, param1 int, param2 interface{})
- func StopServer(stopName string) bool
- type MStartProcess
- type ProcessChannel
- type ServersState
- type ZbProcess
Constants ¶
This section is empty.
Variables ¶
View Source
var ( MProcessName = make(chan string) // 进程管理 MProcessChannelMap = make(map[string]ProcessChannel) // 维护的进程列表 进程需要知道自己的名称,通过这个通道传递退出信号, 如果有退出信号则退出 Quit 有值则退出 MStartProcessName = make(chan MStartProcess) // 需要启动的进程名称 MStopProcessName = make(chan string) // 需要关停的进程名称 MLocalStopProcessName = make(chan string) // 进程内部发起的关停 MQueryProcessState = make(chan int) // 传递进程状态 MServers = make(chan map[string]ZbProcess) // 在运行的进程 MAutoServers = make(chan ServersState) // 进程运行状态 )
Functions ¶
func GetProcessState ¶
func GuardServer ¶
func GuardServer(serversState ServersState)
func GuardServers ¶
func GuardServers()
func StartServer4Marnge ¶
Types ¶
type MStartProcess ¶
func (*MStartProcess) GetSubProcess ¶
func (startProcess *MStartProcess) GetSubProcess() (subProcessName string)
根据参数1重新编辑子程的名称 主进程名称+"-"+编号
type ProcessChannel ¶
type ProcessChannel struct {
Quit chan string
}
Click to show internal directories.
Click to hide internal directories.