config

package
v1.0.10 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ERROR_DEBUG_ENV = "Check environment variables: DEBUG"

	SUFFIX_DEV  = "_dev"
	SUFFIX_PROD = "_prod"
)
View Source
const (
	DEFAULT_CONFIG_PATH = "/config"
	DEFAULT_CONFIG_TYPE = "yaml"
)

Variables

This section is empty.

Functions

func LoadConfigFromEtcd added in v1.0.5

func LoadConfigFromEtcd(opts ...Option) (*viper.Viper, error)

RemoteConfig

Types

type Option

type Option func(opts *Options)

func ConfigPath

func ConfigPath(val string) Option

func ConfigType

func ConfigType(val string) Option

func EtcdEndpoint added in v1.0.5

func EtcdEndpoint(val string) Option

func SetOption

func SetOption(k, v interface{}) Option

type Options

type Options struct {
	// viper configuration (https://github.com/spf13/viper)
	ConfigPath         string
	ConfigType         string
	ConfigEtcdEndpoint string

	//COption
	Context context.Context
}

Jump to

Keyboard shortcuts

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