Mutils

package
v0.0.0-...-2ea0082 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const DEBUGSW bool = false
View Source
const VERSION string = "1.0"

Variables

This section is empty.

Functions

This section is empty.

Types

type GlobalObj

type GlobalObj struct {
	// server相关
	TcpServer         Miface.MServer // `服务器类型`
	ServerName        string         `json:"服务器名称"`
	ServerIPVer       string         `json:"服务器IP版本"`
	ServerIP          string         `json:"服务器ip地址"`
	ServerPort        int            `json:"服务器端口"`
	ServerRWByteLen   uint32         `json:"服务器读写缓存最大值"`
	ServerMaxConn     int            `json:"服务器最大运行连接数"`
	ServerWorkUnitNum int            `json:"服务器工作单元的最大数量"`
	ServerWorkDuilie  int64          `json:"服务器每个工作单元的工作队列的数量"`

	// 总框架 相关
	DebugSw bool   // '框架debug开关 打开则不读取json脚本数据'
	Version string // `json:"框架版本号"`
}

保存读取全局配置 给其他模块直接调用

var GlobalValue *GlobalObj

实例化一个全局的GlobalObj对象 供给其他模块使用

func (*GlobalObj) LoadJson

func (g *GlobalObj) LoadJson()

读取json配置文件

Jump to

Keyboard shortcuts

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