Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( RunningDir = osxu.GetRunningDir() BaseLogPath = osxu.GetRunningDir() + "/log" )
Functions ¶
This section is empty.
Types ¶
type ModuleConfig ¶
type ModuleConfig struct { Socks []SockConf `json:"socks,omitempty"` Routes []ObjectConf `json:"routes,omitempty"` Admins []ObjectConf `json:"admins,omitempty"` Games []ObjectConf `json:"games,omitempty"` OnList []string `json:"onList"` // contains filtered or unexported fields }
var DefaultModuleConfig *ModuleConfig
func ParseModuleConfig ¶
func ParseModuleConfig(flagSet *cmdx.FlagSetExtend) *ModuleConfig
func ParseModuleConfigByContent ¶
func ParseModuleConfigByContent(content []byte) *ModuleConfig
func ParseModuleConfigByPath ¶
func ParseModuleConfigByPath(path string) *ModuleConfig
func (*ModuleConfig) GetObjectById ¶
func (c *ModuleConfig) GetObjectById(id string) (ObjectConf, bool)
func (*ModuleConfig) GetServiceConf ¶
func (c *ModuleConfig) GetServiceConf(name string) (SockConf, bool)
type ObjectConf ¶
type ObjectConf struct { Id string `json:"id"` ModuleName string `json:"module"` RpcList []string `json:"rpc,omitempty"` SockList []string `json:"socks,omitempty"` Remotes []string `json:"remotes,omitempty"` Log string `json:"log,omitempty"` // contains filtered or unexported fields }
func GetObjectById ¶
func GetObjectById(name string) (ObjectConf, bool)
func (ObjectConf) GetServiceConf ¶
func (c ObjectConf) GetServiceConf(name string) (SockConf, bool)
func (ObjectConf) LogFileInfo ¶
func (oc ObjectConf) LogFileInfo() (fileDir string, fileBaseName string, fileExtName string)
Click to show internal directories.
Click to hide internal directories.