config

package
v0.17.1 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2017 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertConfigCompatibleWithRuntime added in v0.17.0

func AssertConfigCompatibleWithRuntime(conf *viper.Viper) error

func GetConfigurationFileBytes added in v0.16.0

func GetConfigurationFileBytes(chainId, moniker, seeds string, chainImageName string,
	useDataContainer bool, exportedPortsString, containerEntrypoint string) ([]byte, error)

NOTE: [ben] for 0.12.0-rc3 we only have a single configuration path with Tendermint in-process as the consensus engine and BurrowMint in-process as the application manager, so we hard-code the few parameters that are already templated. Let's learn to walk before we can run.

func GetExampleConfigFileBytes added in v0.16.0

func GetExampleConfigFileBytes() ([]byte, error)

func ReadViperConfig added in v0.17.0

func ReadViperConfig(configBytes []byte) (*viper.Viper, error)

Read in TOML Viper config from bytes

func ViperSubConfig added in v0.16.0

func ViperSubConfig(conf *viper.Viper, configSubtreePath string) (subConfig *viper.Viper, err error)

Safely get the subtree from a viper config, returning an error if it could not be obtained for any reason.

Types

type ConfigChainGeneral added in v0.16.0

type ConfigChainGeneral struct {
	AssertChainId       string
	BurrowMajorVersion  uint8
	BurrowMinorVersion  uint8
	GenesisRelativePath string
}

TODO: [ben] increase the configurability upon need

type ConfigChainModule added in v0.16.0

type ConfigChainModule struct {
	Name               string
	ModuleRelativeRoot string
}

type ConfigServiceGeneral added in v0.16.0

type ConfigServiceGeneral struct {
	ChainImageName      string
	UseDataContainer    bool
	ExportedPorts       string
	ContainerEntrypoint string
}

type ConfigTendermint added in v0.16.0

type ConfigTendermint struct {
	Moniker  string
	Seeds    string
	FastSync bool
}

type ModuleConfig

type ModuleConfig struct {
	Module      string
	Name        string
	WorkDir     string
	DataDir     string
	RootDir     string
	ChainId     string
	GenesisFile string
	Config      *viper.Viper
}

Jump to

Keyboard shortcuts

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