config

package
v2.1.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2020 License: GPL-3.0 Imports: 20 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 []byte) interface{}

func OnConfigChange

func OnConfigChange(f interface{})

Example: config.OnConfigChange(func(new, old *conf.Configuration) {

}) Callback call after initial loading and after every config files changing. On first call new and old configurations are equals

func UnsafeSet added in v1.5.0

func UnsafeSet(localConfig interface{})

func UnsafeSetRemote added in v1.5.0

func UnsafeSetRemote(remoteConfig interface{})

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