Documentation ¶
Index ¶
- type Config
- func (cf *Config) ContainsKey(key string) bool
- func (cf *Config) Get(key string) interface{}
- func (cf *Config) GetBool(key string) bool
- func (cf *Config) GetFloat64(key string) float64
- func (cf *Config) GetInt(key string) int
- func (cf *Config) GetInt64(key string) int64
- func (cf *Config) GetString(key string) string
- func (cf *Config) MergeConfig(configPath string) (*Config, error)
- func (cf *Config) OnConfigChange(run func(in fsnotify.Event))
- func (cf *Config) Set(key string, value interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
Config manager
func NewRawConfig ¶
func NewRawConfig() *Config
NewRawConfig new config without underlying config file.
func (*Config) ContainsKey ¶
ContainsKey judge whether the key is set in the config.
func (*Config) GetFloat64 ¶
GetFloat64 a key return Float64
func (*Config) MergeConfig ¶
MergeConfig merge config by the config file path, the file try to merge should have same format.
func (*Config) OnConfigChange ¶
OnConfigChange register function to invoke when config file change.
Click to show internal directories.
Click to hide internal directories.