Documentation ¶
Index ¶
- Variables
- func Close()
- func Decode(dst interface{}) error
- func Init() (err error)
- func Watch(key string, dst interface{}) error
- type Event
- type EventFunc
- type EventType
- type File
- type Value
- func (v *Value) Blob() ([]byte, error)
- func (v *Value) Bool() (bool, error)
- func (v *Value) Duration() (time.Duration, error)
- func (v *Value) Float32() (float32, error)
- func (v *Value) Float64() (float64, error)
- func (v *Value) Int() (int, error)
- func (v *Value) Int32() (int32, error)
- func (v *Value) Int64() (int64, error)
- func (v *Value) String() (string, error)
- func (v *Value) UnmarshalJSON(dst interface{}) error
- func (v *Value) UnmarshalTOML(dst interface{}) error
- func (v *Value) UnmarshalYAML(dst interface{}) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrValueNotExist = errors.New("hot: value not exist") ErrValueTypeAssertion = errors.New("hot: value type assertion no match") )
ErrValueNotExist .
Functions ¶
Types ¶
type File ¶
type File struct {
// contains filtered or unexported fields
}
File has all values and a watcher
var (
DefaultClient *File
)
DefaultClient .
type Value ¶
type Value struct {
// contains filtered or unexported fields
}
Value is config value: json, toml, yaml, ini or plain text. Param blob keeps the origin form ([]byte) of value
func (*Value) UnmarshalJSON ¶
UnmarshalJSON unmarshals JSON to struct
func (*Value) UnmarshalTOML ¶
UnmarshalTOML unmarshals TOML to struct
func (*Value) UnmarshalYAML ¶
UnmarshalYAML unmarshals JSON to struct
Click to show internal directories.
Click to hide internal directories.