config package - code.vegaprotocol.io/vegacapsule/config - Go Packages
Documentation ¶ Index ¶ Constants func DefaultNetworkHome() (string, error) func ParseHCLFile(filePath string) (*hcl.File, error) func TemplateStruct(v reflect.Value, templateFunc func(templateRaw string) (*bytes.Buffer, error)) error type ClefConfig type Config func ApplyConfigContext(conf *Config, genServices *types.GeneratedServices) (*Config, error) func DefaultConfig() (*Config, error) func ParseConfigFile(filePath, outputDir string, genServices types.GeneratedServices) (*Config, error) func (c Config) BinariesDir() string func (c Config) GetSmartContractToken(name string) *types.SmartContractsToken func (c *Config) GetVegaBinary() string func (c *Config) GetWalletVegaBinary() *string func (c Config) LoadConfigTemplateFile(path string) (string, error) func (c Config) LogsDir() string func (c *Config) Persist() error func (c Config) PrimarySmartContractsInfo() (*types.SmartContractsInfo, error) func (c Config) SecondarySmartContractsInfo() (*types.SmartContractsInfo, error) func (c *Config) SetBinaryPaths(bins installer.InstalledBins) func (c *Config) Validate(configDir string) error type ConfigTemplates type DockerConfig type EthereumConfig type ExecConfig type FaucetConfig type NetworkConfig func (nc NetworkConfig) GetNodeConfig(name string) (*NodeConfig, error) type NodeConfig func TemplateNodeConfig(templateContext NodeConfigTemplateContext, n NodeConfig) (*NodeConfig, error) func (nc NodeConfig) Clone() (*NodeConfig, error) type NodeConfigTemplateContext type NomadConfig type PStartConfig type PreGenerate type Resources type StaticPort type WalletConfig Constants ¶ View Source const ( WalletSubCmd = "wallet" DataNodeSubCmd = "datanode" FaucetSubCmd = "faucet" ) Variables ¶ This section is empty.
Functions ¶ func DefaultNetworkHome ¶ func DefaultNetworkHome() ( string , error ) func ParseHCLFile ¶ added in v0.3.0 func ParseHCLFile(filePath string ) (* hcl . File , error ) func TemplateStruct ¶ added in v0.3.0 func TemplateStruct(v reflect . Value , templateFunc func(templateRaw string ) (* bytes . Buffer , error )) error Types ¶ type ClefConfig ¶ added in v0.2.0 type ClefConfig struct { /* description: | List of Clef pre-generated Ethereum addresses that can be used by node set. note: | There should be enough available addresses for each node set.
So when node set has `count = 2` there has to be minimum 2 addresses defined similarly when `count = 4` there has to be minimum 4 addresses defined etc. example: type: hcl value: | ethereum_account_addresses = ["0xc0ffee254729296a45a3885639AC7E10F9d54979", "0x999999cf1046e68e36E1aA2E0E07105eDDD1f08E"] */ AccountAddresses [] string `hcl:"ethereum_account_addresses" template:""` /* description: Address of running Clef instance example: type: hcl value: | clef_rpc_address = " http://localhost:8555 " */ ClefRPCAddr string `hcl:"clef_rpc_address" template:""` } description: | Allows to configure connetion to [Clef](https://geth.ethereum.org/docs/clef/introduction) Ethereum wallet. example: type: hcl value: | clef_wallet { ethereum_account_addresses = ["0xc0ffee254729296a45a3885639AC7E10F9d54979", "0x999999cf1046e68e36E1aA2E0E07105eDDD1f08E"] clef_rpc_address = "http://localhost:8555" } type Config ¶ type Config struct { // description: Configuration of Vega network and its dependencies.
Network NetworkConfig `hcl:"network,block"` /* description: | Directory path (relative or absolute) where Capsule stores generated folders, files, logs and configurations for network. default: ~/.vegacapsule/testnet */ OutputDir * string `hcl:"output_dir"` // description: Path (relative or absolute) to vega binary that will be used to generate and run the network. // default: vega VegaBinary * string `hcl:"vega_binary_path"` /* description: | Path (relative or absolute) of a Capsule binary.
The Capsule binary is used to aggregate logs from running jobs and save them to local disk in Capsule home directory. See `vegacapsule nomad logscollector` for more info. default: Currently running Capsule instance binary note: This optional parameter is used internally. There should never be any need to set it to anything other than default. */ VegaCapsuleBinary * string `hcl:"vega_capsule_binary_path,optional"` // Non configurable section - internal variables NodeDirPrefix string TendermintNodePrefix string VegaNodePrefix string DataNodePrefix string WalletPrefix string FaucetPrefix string VisorPrefix string HCLBodyRaw [] byte // contains filtered or unexported fields } name: Root description: | All parameters from this types are used directly in the config file.
Most of the parameters here are optional and can be left alone. Please see the example below. example: type: hcl value: | vega_binary_path = "/path/to/vega" network "your_network_name" { ... } func ApplyConfigContext ¶ added in v0.3.0 func ApplyConfigContext(conf * Config , genServices * types . GeneratedServices ) (* Config , error ) func DefaultConfig ¶ func DefaultConfig() (* Config , error ) func ParseConfigFile ¶ func ParseConfigFile(filePath, outputDir string , genServices types .
GeneratedServices ) (* Config , error ) func (Config) BinariesDir ¶ added in v0.2.3 func (c Config ) BinariesDir() string func (Config) GetSmartContractToken ¶ added in v0.3.0 func (c Config ) GetSmartContractToken(name string ) * types . SmartContractsToken func (*Config) GetVegaBinary ¶ added in v0.2.3 func (c * Config ) GetVegaBinary() string func (*Config) GetWalletVegaBinary ¶ added in v0.3.0 func (c * Config ) GetWalletVegaBinary() * string func (Config) LoadConfigTemplateFile ¶ added in v0.2.3 func (c Config ) LoadConfigTemplateFile(path string ) ( string , error ) func (Config) LogsDir ¶ added in v0.2.3 func (c Config ) LogsDir() string func (*Config) Persist ¶ func (c * Config ) Persist() error func (Config) PrimarySmartContractsInfo ¶ added in v0.76.8 func (c Config ) PrimarySmartContractsInfo() (* types .
SmartContractsInfo , error ) func (Config) SecondarySmartContractsInfo ¶ added in v0.76.8 func (c Config ) SecondarySmartContractsInfo() (* types . SmartContractsInfo , error ) func (*Config) SetBinaryPaths ¶ added in v0.2.3 func (c * Config ) SetBinaryPaths(bins installer . InstalledBins ) func (*Config) Validate ¶ func (c * Config ) Validate(configDir string ) error type ConfigTemplates ¶ type ConfigTemplates struct { /* description: | [Go template](templates.md) of Vega config.
The [vega.ConfigTemplateContext](templates.md#vegaconfigtemplatecontext) can be used in the template. Example [example](net_confs/node_set_templates/default/vega_validators.tmpl). optional_if: vega_file note: | It is recommended that you use `vega_file` param instead. If both `vega` and `vega_file` are defined, then `vega` overrides `vega_file`. examples: - type: hcl value: | vega = <<EOH ... EOH */ Vega * string `hcl:"vega,optional"` /* description: | Same as `vega` but it allows the user to link the Vega config template as an external file. examples: - type: hcl value: | vega_file = "/your_path/vega_config.tmpl" */ VegaFile * string `hcl:"vega_file,optional"` /* description: | [Go template](templates.md) of Tendermint config.
The [tendermint.ConfigTemplateContext](templates.md#tendermintconfigtemplatecontext) can be used in the template. Example [example](net_confs/node_set_templates/default/tendermint_validators.tmpl). optional_if: tendermint_file note: | It is recommended that you use `tendermint_file` param instead. If both `tendermint` and `tendermint_file` are defined, then `tendermint` overrides `tendermint_file`. examples: - type: hcl value: | tendermint = <<EOH ...
EOH */ Tendermint * string `hcl:"tendermint,optional"` /* description: | Same as `tendermint` but it allows the user to link the Tendermint config template as an external file. examples: - type: hcl value: | tendermint_file = "/your_path/tendermint_config.tmpl" */ TendermintFile * string `hcl:"tendermint_file,optional"` /* description: | [Go template](templates.md) of Data Node config. The [datanode.Config
The rest of this page is on the live site.