xconfig

package
v1.0.2 Latest Latest
Warning

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

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

README

引擎运行环境配置

统一通过该配置文件管理基础运行环境配置。

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"`
	// config 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 config file name
	EngineConf string `yaml:"engineConf,omitempty"`
	// log config file name
	LogConf string `yaml:"logConf,omitempty"`
	// server config file name
	ServConf string `yaml:"servConf,omitempty"`
	// network config file name
	NetConf string `yaml:"netConf,omitempty"`
	// ledger config 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