ttviper

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2022 License: Apache-2.0 Imports: 12 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	GlobalSource = pflag.String("global.source", "default(flag)", "identify the source of configuration")
	//var globalUnset = pflag.String("global.unset", "default(flag)", "this parameter do not appear in config file")
	GlobalUnset = pflag.String("global.unset", "", "this parameter do not appear in config file")
)

Functions

This section is empty.

Types

type Config

type Config struct {
	Viper *viper.Viper
}

Config

func ConfigInit

func ConfigInit(envPrefix string, cfgName string) Config

ConfigInit initializes the configuration

func (*Config) InitLogger

func (v *Config) InitLogger() *zap.Logger

InitLogger

func (*Config) SetDefaultValue

func (v *Config) SetDefaultValue()

SetConfigType

func (*Config) SetRemoteConfig

func (v *Config) SetRemoteConfig(u *url.URL)

SetRemoteConfig sets the config from remote.

func (*Config) WatchRemoteConf

func (v *Config) WatchRemoteConf()

WatchRemoteConf watch the configuration of the remote provider and

func (*Config) ZapLogConfig

func (v *Config) ZapLogConfig() []byte

ZapLogConfig

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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