Allow multiple sub sections for tcp/udp server
This commit is contained in:
parent
9e30766caa
commit
b8e7f2e133
6
g/g.go
6
g/g.go
@ -7,6 +7,7 @@ import (
|
|||||||
var (
|
var (
|
||||||
GlbClientCfg *ClientCfg
|
GlbClientCfg *ClientCfg
|
||||||
GlbServerCfg *ServerCfg
|
GlbServerCfg *ServerCfg
|
||||||
|
GlbServerSubSectionMap map[string]*config.SubServerSectionConf
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
@ -14,8 +15,9 @@ func init() {
|
|||||||
ClientCommonConf: *config.GetDefaultClientConf(),
|
ClientCommonConf: *config.GetDefaultClientConf(),
|
||||||
}
|
}
|
||||||
GlbServerCfg = &ServerCfg{
|
GlbServerCfg = &ServerCfg{
|
||||||
ServerCommonConf: *config.GetDefaultServerConf(),
|
ServerSectionConf: *config.GetDefaultServerConf(),
|
||||||
}
|
}
|
||||||
|
GlbServerSubSectionMap = make(map[string]*config.SubServerSectionConf)
|
||||||
}
|
}
|
||||||
|
|
||||||
type ClientCfg struct {
|
type ClientCfg struct {
|
||||||
@ -26,7 +28,7 @@ type ClientCfg struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type ServerCfg struct {
|
type ServerCfg struct {
|
||||||
config.ServerCommonConf
|
config.ServerSectionConf
|
||||||
|
|
||||||
CfgFile string
|
CfgFile string
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user