Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Configer IConfiger FileConfigerFactory map[string]func(string, string, string, string, bool, interface{}) IConfiger = make(map[string]func(string, string, string, string, bool, interface{}) IConfiger) RemoteConfigerFactory map[string]func(string, string, string, string, bool, interface{}) IConfiger = make(map[string]func(string, string, string, string, bool, interface{}) IConfiger) )
Functions ¶
func ParseConfig ¶
- For static config file, the configPath will be <path>/<file>. i.e. ./conf/app.yaml
- For remote key/value store, the configPath will be <kvstoreType>#<kvstoreHost>#<kvstoreKey>#kvstoreType。 i.e. etcd|http://127.0.0.1:4001|/config/hugo.yaml|yaml. Currently, only etcd, consul, and Google filestore are supported
Types ¶
type BaseConfiger ¶
type BaseConfiger struct { WatchChange bool RawVal interface{} }
type FileConfiger ¶
type FileConfiger struct { BaseConfiger ConfigFile string ConfigName string ConfigType string ConfigPath string }
type IConfiger ¶
type IConfiger interface {
// contains filtered or unexported methods
}
func NewIniConfiger ¶
type IniConfiger ¶
type IniConfiger struct {
FileConfiger
}
type RemoteConfiger ¶
type RemoteConfiger struct { BaseConfiger RemoteProvider string RemoteHost string ConfigKey string ConfigType string }
type YamlConfiger ¶
type YamlConfiger struct {
FileConfiger
}
Click to show internal directories.
Click to hide internal directories.