Documentation ¶
Index ¶
- Variables
- func AddConfPath(path string)
- func DeleteRemote(key string) error
- func Get(key string) interface{}
- func GetAll() map[string]interface{}
- func GetBool(key string) bool
- func GetFloat64(key string) float64
- func GetInt(key string) int
- func GetInt64(key string) int64
- func GetIntSlice(key string) []int
- func GetRemote(key string) (string, error)
- func GetRemoteKeys(prefix string) ([]string, error)
- func GetString(key string) string
- func GetStringMap(key string) map[string]interface{}
- func GetStringMapString(key string) map[string]string
- func GetStringSlice(key string) []string
- func GetUint(key string) uint
- func PutRemote(key, value string) error
- func ReadConf() error
- func ReadInConf(content []byte) error
- func SetConfName(name string)
- func SetRemoteAddr(addr []string) error
- func Watcher(key string, c chan string)
- type Owl
- func (o *Owl) AddConfPath(path string)
- func (o *Owl) DeleteRemote(key string) error
- func (o *Owl) Get(key string) interface{}
- func (o *Owl) GetAll() map[string]interface{}
- func (o *Owl) GetBool(key string) bool
- func (o *Owl) GetFloat64(key string) float64
- func (o *Owl) GetInt(key string) int
- func (o *Owl) GetInt64(key string) int64
- func (o *Owl) GetIntSlice(key string) []int
- func (o *Owl) GetRemote(key string) (string, error)
- func (o *Owl) GetRemoteKeys(prefix string) ([]string, error)
- func (o *Owl) GetString(key string) string
- func (o *Owl) GetStringMap(key string) map[string]interface{}
- func (o *Owl) GetStringMapString(key string) map[string]string
- func (o *Owl) GetStringSlice(key string) []string
- func (o *Owl) GetUint(key string) uint
- func (o *Owl) PutRemote(key, value string) error
- func (o *Owl) ReadConf() error
- func (o *Owl) ReadInConf(content []byte) error
- func (o *Owl) SetConfName(name string)
- func (o *Owl) SetRemoteAddr(addr []string) error
- func (o *Owl) Watcher(key string, c chan string)
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func AddConfPath ¶
func AddConfPath(path string)
AddConfPath adds a path for owl to search for the config file in.
func Get ¶
func Get(key string) interface{}
Get returns the value associated with the key as interface.
func GetFloat64 ¶
GetFloat64 returns the value associated with the key as float64.
func GetIntSlice ¶
GetIntSlice returns the value associated with the key as int slice.
func GetRemoteKeys ¶
GetRemoteKeys get keys from etcd by prefix
func GetStringMap ¶
GetStringMap returns the value associated with the key as string map.
func GetStringMapString ¶
func GetStringSlice ¶
GetStringSlice returns the value associated with the key as string slice.
func ReadConf ¶
func ReadConf() error
ReadConf will read a configuration file, setting existing keys to nil if the key does not exist in the file.
func ReadInConf ¶
ReadInConf will read a configuration file, setting existing keys to nil if the key does not exist in the file.
func SetConfName ¶
func SetConfName(name string)
Types ¶
type Owl ¶
type Owl struct {
// contains filtered or unexported fields
}
Owl is a lib for get configure value from etcd.