Allow multiple sub sections for tcp/udp server

This commit is contained in:
Tim David Saxen 2018-11-29 09:00:51 +01:00 committed by GitHub
parent 9e30766caa
commit b8e7f2e133
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

6
g/g.go
View File

@ -7,6 +7,7 @@ import (
var (
GlbClientCfg *ClientCfg
GlbServerCfg *ServerCfg
GlbServerSubSectionMap map[string]*config.SubServerSectionConf
)
func init() {
@ -14,8 +15,9 @@ func init() {
ClientCommonConf: *config.GetDefaultClientConf(),
}
GlbServerCfg = &ServerCfg{
ServerCommonConf: *config.GetDefaultServerConf(),
ServerSectionConf: *config.GetDefaultServerConf(),
}
GlbServerSubSectionMap = make(map[string]*config.SubServerSectionConf)
}
type ClientCfg struct {
@ -26,7 +28,7 @@ type ClientCfg struct {
}
type ServerCfg struct {
config.ServerCommonConf
config.ServerSectionConf
CfgFile string
}