Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config interface {
Load() error
Scan(v interface{}) error
Value(key string) Value
Watch(key string, o Observer) error
Close() error
}
Config 是配置接口
type KeyValue ¶
type KeyValue struct {
Key string
Value string
// Format 是配置内容的格式,例如 "json", "yaml", "toml", "properties"
Format string
}
KeyValue 是配置键值对
type Reader ¶
type Reader interface {
Merge(*KeyValue)
Value(string) (Value, error)
Values(string) (map[string]interface{}, error)
}
Reader 是配置读取器
Click to show internal directories.
Click to hide internal directories.