config

package
v1.1.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 29, 2019 License: GPL-3.0 Imports: 19 Imported by: 7

Documentation

Index

Constants

View Source
const (
	LocalConfigEnvPrefix  = "LC_ISP"
	RemoteConfigEnvPrefix = "RC_ISP"
)

Variables

This section is empty.

Functions

func Get

func Get() interface{}

func GetRemote

func GetRemote() interface{}

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"
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL