Documentation
¶
Index ¶
Constants ¶
View Source
const ( MAXUINT32 = 4294967295 DEFAULT_UUID_CNT_CACHE = 512 )
Variables ¶
This section is empty.
Functions ¶
func HttpRequestWrap ¶
func HttpRequestWrap(uri string, targat func(http.ResponseWriter, *http.Request)) func(http.ResponseWriter, *http.Request)
func ReSettingLog ¶
func ReSettingLog()
Types ¶
type GlobalObj ¶
type GlobalObj struct {
TcpServers map[string]iface.Iserver
TcpServer iface.Iserver
OnConnectioned func(fconn iface.Iconnection)
OnClosed func(fconn iface.Iconnection)
OnClusterConnectioned func(fconn iface.Iconnection) //集群rpc root节点回调
OnClusterClosed func(fconn iface.Iconnection)
OnClusterCConnectioned func(fconn iface.Iclient) //集群rpc 子节点回调
OnClusterCClosed func(fconn iface.Iclient)
OnServerStop func() //服务器停服回调
Protoc iface.IServerProtocol
RpcSProtoc iface.IServerProtocol
RpcCProtoc iface.IClientProtocol
Host string
DebugPort int //telnet port 用于单机模式
WriteList []string //telnet ip list
TcpPort int
MaxConn int
IntraMaxConn int //内部服务器最大连接数
//log
LogPath string
LogName string
MaxLogNum int32
MaxFileSize int64
LogFileUnit logger.UNIT
LogLevel logger.LEVEL
SetToConsole bool
LogFileType int32
PoolSize int32
MaxWorkerLen int32
MaxSendChanLen int32
FrameSpeed uint8
Name string
MaxPacketSize uint32
FrequencyControl string // 100/h, 100/m, 100/s
CmdInterpreter iface.ICommandInterpreter //xingo debug tool Interpreter
ProcessSignalChan chan os.Signal
// contains filtered or unexported fields
}
var GlobalObject *GlobalObj
func (*GlobalObj) GetFrequency ¶
func (*GlobalObj) GetSafeTimer ¶
func (this *GlobalObj) GetSafeTimer() *timer.SafeTimerScheduel
func (*GlobalObj) IsThreadSafeMode ¶
type UUIDGenerator ¶
type UUIDGenerator struct {
Prefix string
// contains filtered or unexported fields
}
func NewUUIDGenerator ¶
func NewUUIDGenerator(prefix string) *UUIDGenerator
func (*UUIDGenerator) Get ¶
func (this *UUIDGenerator) Get() string
func (*UUIDGenerator) GetUint32 ¶
func (this *UUIDGenerator) GetUint32() uint32
Click to show internal directories.
Click to hide internal directories.