Documentation ¶
Index ¶
- func GetAssetsPath() string
- func NewGLogger() *glog.LoggingT
- func SetArgs(args *ArgsBase)
- func SetLogger(log ILogger)
- type App
- type AppInterface
- type ArgsBase
- type ArgsCommon
- type ArgsPending
- type ArgsRedis
- type CommonServerType
- type DefaultLogger
- func (this *DefaultLogger) Debug(args ...interface{})
- func (this *DefaultLogger) Debugf(format string, args ...interface{})
- func (this *DefaultLogger) Debugln(args ...interface{})
- func (this *DefaultLogger) Error(args ...interface{})
- func (this *DefaultLogger) Errorf(format string, args ...interface{})
- func (this *DefaultLogger) Errorln(args ...interface{})
- func (this *DefaultLogger) Fatal(args ...interface{})
- func (this *DefaultLogger) Fatalf(format string, args ...interface{})
- func (this *DefaultLogger) Fatalln(args ...interface{})
- func (this *DefaultLogger) Flush()
- func (this *DefaultLogger) Info(args ...interface{})
- func (this *DefaultLogger) Infof(format string, args ...interface{})
- func (this *DefaultLogger) Infoln(args ...interface{})
- func (this *DefaultLogger) Print(args ...interface{})
- func (this *DefaultLogger) Printf(format string, args ...interface{})
- func (this *DefaultLogger) Println(args ...interface{})
- func (this *DefaultLogger) SetLogDir(dir string)
- func (this *DefaultLogger) SetLogLevel(level int)
- func (this *DefaultLogger) Warning(args ...interface{})
- func (this *DefaultLogger) Warningf(format string, args ...interface{})
- func (this *DefaultLogger) Warningln(args ...interface{})
- type IArgs
- type IArgsBase
- type ILogger
- type ServerTypeConfig
- type ServerTypeInfo
- type TcpServer
- type WebService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAssetsPath ¶
func GetAssetsPath() string
func NewGLogger ¶
Types ¶
type App ¶
type App struct { Derived AppInterface Type int Args IArgs Logger ILogger Node interface{} // contains filtered or unexported fields }
type AppInterface ¶
type AppInterface interface { OnAppReady() OnAppShutDown() }
type ArgsBase ¶
type ArgsBase struct { Common ArgsCommon // 一些基础参数 Pending ArgsPending // 悬而未决的配置,OnInit()函数内用户最终设置。不同的节点会有针对性的设置。 DbAccount ArgsRedis // 帐号数据库(Redis) DbToken ArgsRedis // Token数据库(Redis) DbServer ArgsRedis // Server数据库(Redis) }
type ArgsCommon ¶
type ArgsPending ¶
type ArgsPending struct {
WatchNodeTypes []int `default:""` // 本节点要watch其他节点的节点类型
}
type CommonServerType ¶
type CommonServerType int
const ( Client CommonServerType = iota // 0 Login // 1 Gateway // 2 Hub // 3 COMMON_SERVER_END = 9 // 9 )
type DefaultLogger ¶
type DefaultLogger struct { }
func NewDefaultLogger ¶
func NewDefaultLogger() *DefaultLogger
func (*DefaultLogger) Debug ¶
func (this *DefaultLogger) Debug(args ...interface{})
func (*DefaultLogger) Debugf ¶
func (this *DefaultLogger) Debugf(format string, args ...interface{})
func (*DefaultLogger) Debugln ¶
func (this *DefaultLogger) Debugln(args ...interface{})
func (*DefaultLogger) Error ¶
func (this *DefaultLogger) Error(args ...interface{})
func (*DefaultLogger) Errorf ¶
func (this *DefaultLogger) Errorf(format string, args ...interface{})
func (*DefaultLogger) Errorln ¶
func (this *DefaultLogger) Errorln(args ...interface{})
func (*DefaultLogger) Fatal ¶
func (this *DefaultLogger) Fatal(args ...interface{})
func (*DefaultLogger) Fatalf ¶
func (this *DefaultLogger) Fatalf(format string, args ...interface{})
func (*DefaultLogger) Fatalln ¶
func (this *DefaultLogger) Fatalln(args ...interface{})
func (*DefaultLogger) Flush ¶
func (this *DefaultLogger) Flush()
func (*DefaultLogger) Info ¶
func (this *DefaultLogger) Info(args ...interface{})
func (*DefaultLogger) Infof ¶
func (this *DefaultLogger) Infof(format string, args ...interface{})
func (*DefaultLogger) Infoln ¶
func (this *DefaultLogger) Infoln(args ...interface{})
func (*DefaultLogger) Print ¶
func (this *DefaultLogger) Print(args ...interface{})
func (*DefaultLogger) Printf ¶
func (this *DefaultLogger) Printf(format string, args ...interface{})
func (*DefaultLogger) Println ¶
func (this *DefaultLogger) Println(args ...interface{})
func (*DefaultLogger) SetLogDir ¶
func (this *DefaultLogger) SetLogDir(dir string)
func (*DefaultLogger) SetLogLevel ¶
func (this *DefaultLogger) SetLogLevel(level int)
func (*DefaultLogger) Warning ¶
func (this *DefaultLogger) Warning(args ...interface{})
func (*DefaultLogger) Warningf ¶
func (this *DefaultLogger) Warningf(format string, args ...interface{})
func (*DefaultLogger) Warningln ¶
func (this *DefaultLogger) Warningln(args ...interface{})
type ILogger ¶
type ILogger interface { Debug(args ...interface{}) Debugln(args ...interface{}) Debugf(format string, args ...interface{}) Print(args ...interface{}) Println(args ...interface{}) Printf(format string, args ...interface{}) Info(args ...interface{}) Infoln(args ...interface{}) Infof(format string, args ...interface{}) Warning(args ...interface{}) Warningln(args ...interface{}) Warningf(format string, args ...interface{}) Error(args ...interface{}) Errorln(args ...interface{}) Errorf(format string, args ...interface{}) Fatal(args ...interface{}) Fatalln(args ...interface{}) Fatalf(format string, args ...interface{}) Flush() SetLogLevel(level int) SetLogDir(dir string) }
type ServerTypeConfig ¶
type ServerTypeConfig struct {
ServerType []ServerTypeInfo
}
type ServerTypeInfo ¶
type TcpServer ¶
func NewTcpServer ¶
func NewTcpServer() *TcpServer
type WebService ¶
type WebService struct {
// contains filtered or unexported fields
}
func NewWebService ¶
func NewWebService() *WebService
func (*WebService) Close ¶
func (this *WebService) Close()
func (*WebService) HandleFunc ¶
func (this *WebService) HandleFunc(pattern string, handler func(http.ResponseWriter, *http.Request))
func (*WebService) ListenAndServe ¶
func (this *WebService) ListenAndServe(addr string)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.