config

package
v0.0.0-...-b124b1e Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EnvConf

type EnvConf struct {
	// Program running root directory
	RootPath string `yaml:"rootPath,omitempty"`
	// envconfig file directory
	ConfDir string `yaml:"confDir,omitempty"`
	// data file directory
	DataDir string `yaml:"dataDir,omitempty"`
	// log file directory
	LogDir string `yaml:"logDir,omitempty"`
	// tls file directory
	TlsDir string `yaml:"tlsDir,omitempty"`
	// node key directory
	KeyDir string `yaml:"keyDir,omitempty"`
	// blockchain data directory
	ChainDir string `yaml:"chainDir,omitempty"`
	// engine envconfig file name
	EngineConf string `yaml:"engineConf,omitempty"`
	// log envconfig file name
	LogConf string `yaml:"logConf,omitempty"`
	// server envconfig file name
	ServConf string `yaml:"servConf,omitempty"`
	// network envconfig file name
	NetConf string `yaml:"netConf,omitempty"`
	// ledger envconfig file name
	LedgerConf string `yaml:"ledgerConf,omitempty"`
	// metric switch
	MetricSwitch bool `yaml:"metricSwitch,omitempty"`
}

func GetDefEnvConf

func GetDefEnvConf() *EnvConf

func LoadEnvConf

func LoadEnvConf(cfgFile ...string) (*EnvConf, error)

func (*EnvConf) GenConfFilePath

func (t *EnvConf) GenConfFilePath(fName string) string

func (*EnvConf) GenDataAbsPath

func (t *EnvConf) GenDataAbsPath(dir string) string

func (*EnvConf) GenDirAbsPath

func (t *EnvConf) GenDirAbsPath(dir string) string

Jump to

Keyboard shortcuts

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