server

package
v0.0.0-...-246bd56 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2021 License: GPL-3.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Buffer2String

func Buffer2String(buffer []byte, n int) string

Buffer2String

func ReadSvrStr

func ReadSvrStr() string

Types

type Server

type Server struct {
	Stdout *bufio.Reader //子进程输出
	Cmd    *exec.Cmd     //子进程实例
	// contains filtered or unexported fields
}

func (*Server) Back

func (svr *Server) Back(restorePath string)

回档

func (*Server) Clone

func (svr *Server) Clone(port string) lib.Server

复制一个镜像服务器(用于镜像启动)

func (*Server) Close

func (svr *Server) Close()

关闭服务器

func (*Server) CloseInContainer

func (svr *Server) CloseInContainer()

以容器形式关闭服务器

func (*Server) End

func (svr *Server) End()

在容器中注销该服务器

func (*Server) Execute

func (svr *Server) Execute(_command string)

func (*Server) GetDisablePluginList

func (svr *Server) GetDisablePluginList() map[string]lib.Plugin

获取当前实例的禁用插件列表

func (*Server) GetName

func (svr *Server) GetName() string

获取服务器实例名称//获取端口

func (*Server) GetParserList

func (svr *Server) GetParserList() []lib.Parser

获取语法解析器列表

func (*Server) GetPluginList

func (svr *Server) GetPluginList() map[string]lib.Plugin

获取当前实例的插件列表

func (*Server) GetPort

func (svr *Server) GetPort() string

获取端口

func (*Server) Getinfo

func (svr *Server) Getinfo() string

func (*Server) Init

func (svr *Server) Init(name string, argv []string, workDir string)

根据参数初始化服务器

func (*Server) RegParser

func (svr *Server) RegParser(reg string) ([]string, bool)

读取输出流字符串并使用正则表达式提取信息

func (*Server) ReloadConf

func (svr *Server) ReloadConf()

重新读取配置文件

func (*Server) Restart

func (svr *Server) Restart()

重启服务器

func (*Server) Run

func (svr *Server) Run()

正式运行MCD

func (*Server) RunParsers

func (svr *Server) RunParsers(word string)

运行所有语法解析器

func (*Server) RunPlugin

func (svr *Server) RunPlugin(cmd *command.Command)

运行插件

func (*Server) RunPluginClose

func (svr *Server) RunPluginClose()

调用插件释放资源函数

func (*Server) RunUniquePlugin

func (svr *Server) RunUniquePlugin(handle func())

等待现有插件的完成并停止后面插件的运行,在执行相关操作

func (*Server) Say

func (svr *Server) Say(argv ...interface{})

func (*Server) Start

func (svr *Server) Start(name string, Argv []string, workDir string)

启动服务器

func (*Server) Tell

func (svr *Server) Tell(player string, argv ...interface{})

func (*Server) WaitEndLoading

func (svr *Server) WaitEndLoading() bool

func (*Server) WriteLog

func (svr *Server) WriteLog(level string, msg string)

写入日志

Jump to

Keyboard shortcuts

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