Documentation ¶
Index ¶
Constants ¶
View Source
const PathPrefix = "/hotconf/"
Variables ¶
This section is empty.
Functions ¶
func Handle ¶
func Handle(key string, currentValue interface{}, h HotConfHandler)
Types ¶
type ConfValue ¶
type ConfValue struct { Pre interface{} Current interface{} Default interface{} }
ConfValue is the value set by hotconf
type HotConf ¶
type HotConf interface { // Handle should be guaranteed thread-safe by the user Handle(key string, currentValue interface{}, h HotConfHandler) }
HotConf means the config option can be hot changed without restarting the process
type HotConfHandler ¶
HotConfHandler handle the change event of a key, and return the current value
Click to show internal directories.
Click to hide internal directories.