fabric: github.com/hyperledger/fabric/core/config Index | Files | Directories

package config

import "github.com/hyperledger/fabric/core/config"

Index

Package Files

config.go

Constants

const OfficialPath = "/etc/hyperledger/fabric"

func AddConfigPath Uses

func AddConfigPath(v *viper.Viper, p string)

func GetPath Uses

func GetPath(key string) string

---------------------------------------------------------------------------------- GetPath() ---------------------------------------------------------------------------------- GetPath allows configuration strings that specify a (config-file) relative path

For example: Assume our config is located in /etc/hyperledger/fabric/core.yaml with a key "msp.configPath" = "msp/config.yaml".

This function will return:

GetPath("msp.configPath") -> /etc/hyperledger/fabric/msp/config.yaml

----------------------------------------------------------------------------------

func InitViper Uses

func InitViper(v *viper.Viper, configName string) error

---------------------------------------------------------------------------------- InitViper() ---------------------------------------------------------------------------------- Performs basic initialization of our viper-based configuration layer. Primary thrust is to establish the paths that should be consulted to find the configuration we need. If v == nil, we will initialize the global Viper instance ----------------------------------------------------------------------------------

func TranslatePath Uses

func TranslatePath(base, p string) string

---------------------------------------------------------------------------------- TranslatePath() ---------------------------------------------------------------------------------- Translates a relative path into a fully qualified path relative to the config file that specified it. Absolute paths are passed unscathed. ----------------------------------------------------------------------------------

func TranslatePathInPlace Uses

func TranslatePathInPlace(base string, p *string)

---------------------------------------------------------------------------------- TranslatePathInPlace() ---------------------------------------------------------------------------------- Translates a relative path into a fully qualified path in-place (updating the pointer) relative to the config file that specified it. Absolute paths are passed unscathed. ----------------------------------------------------------------------------------

Directories

PathSynopsis
configtest

Package config imports 4 packages (graph) and is imported by 82 packages. Updated 2018-12-11. Refresh now. Tools for package owners.