config

package
v0.0.0-...-470470c Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitializeConfig

func InitializeConfig(confPath string, configCheck bool)

func StoreGlobalConfig

func StoreGlobalConfig(config *Config)

StoreGlobalConfig stores a new config to the globalConf. It mostly uses in the test to avoid some data races.

Types

type Config

type Config struct {
	Log `yaml:"log" toml:"log" json:"log"`
}

func GetGlobalConfig

func GetGlobalConfig() *Config

GetGlobalConfig returns the global configuration for this server. It should store configuration from command line and configuration file. Other parts of the system can read the global configuration use this function.

func (*Config) Load

func (c *Config) Load(confFile string) error

Load loads config options from a toml file.

func (*Config) Valid

func (c *Config) Valid() error

Valid checks if this config is valid.

type Log

type Log struct {
	Config zaplog.Config        `yaml:"config" toml:"config" json:"config"`
	File   zaplog.FileLogConfig `yaml:"file" toml:"file" json:"file"`
}

Jump to

Keyboard shortcuts

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