Documentation ¶
Index ¶
- Constants
- func Get() interface{}
- func GetRemote() interface{}
- func InitConfig(configuration interface{}) interface{}
- func InitConfigV2(configuration interface{}, callOnChangeHandler bool) interface{}
- func InitRemoteConfig(configuration interface{}, remoteConfig string) interface{}
- func OnConfigChange(f interface{})
- type PropertyType
Constants ¶
View Source
const ( LocalConfigEnvPrefix = "LC_ISP" RemoteConfigEnvPrefix = "RC_ISP" )
Variables ¶
This section is empty.
Functions ¶
func InitConfig ¶
func InitConfig(configuration interface{}) interface{}
func InitConfigV2 ¶
func InitConfigV2(configuration interface{}, callOnChangeHandler bool) interface{}
func InitRemoteConfig ¶
func InitRemoteConfig(configuration interface{}, remoteConfig string) interface{}
func OnConfigChange ¶
func OnConfigChange(f interface{})
Example:
config.OnConfigChange(func(new, old *conf.Configuration) { logger.Info(new, old) })
Callback call after initial loading and after every config files changing. On first call new and old configurations are equals
Types ¶
type PropertyType ¶
type PropertyType string
const ( Int PropertyType = "int" Bool PropertyType = "bool" Float32 PropertyType = "float32" Float64 PropertyType = "float64" String PropertyType = "string" )
Click to show internal directories.
Click to hide internal directories.