Documentation ¶
Overview ¶
主要提供配置加载功能,目前是从配置文件中进行配置加载
Index ¶
- type Config
- type Section
- func (s Section) GetBool(key string) (bool, error)
- func (s Section) GetBoolMust(key string, defaultVal bool) bool
- func (s Section) GetDupByPattern(pattern string) Section
- func (s Section) GetFloat64(key string) (float64, error)
- func (s Section) GetFloat64Must(key string, defaultVal float64) float64
- func (s Section) GetInt64(key string) (int64, error)
- func (s Section) GetInt64Must(key string, defaultVal int64) int64
- func (s Section) GetString(key string) (string, error)
- func (s Section) GetStringMust(key, defaultVal string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { ProxyId int UiDir string HttpPort string McPort string McSocketRecvBuffer int McSocketSendBuffer int MotanPort string MetaDataZKAddr string MetaDataZKRoot string LogInfo string LogDebug string LogProfile string LogExpire string // contains filtered or unexported fields }
all data is read only
func NewConfigFromBytes ¶
func NewConfigFromFile ¶
func (*Config) GetSections ¶
type Section ¶
func (Section) GetDupByPattern ¶
func (Section) GetFloat64Must ¶
func (Section) GetStringMust ¶
Click to show internal directories.
Click to hide internal directories.